更改 mysql 配置文件

Changing mysql configuration file

我有一个装有 centos 5 的专用服务器,我已经在其中安装了 mysql。现在的问题是我无法在一个数据库中创建超过 250 个 table。我知道可以通过更改 my.cnf 文件来增加它,但我不知道我需要更改什么代码。我如何连接并获取 my.cnf 文件。我不知道,但我已经使用端口 22 和命令

在 ssh 中获取了它
vi my.cnf

请帮帮我。下面是我用上面的方法得到的内容。

datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# To allow mysqld to connect to a MySQL Cluster management daemon, uncomment
# these lines and adjust the connectstring as needed.
#ndbcluster
#ndb-connectstring="nodeid=4;host=localhost:1186"

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[ndbd]
# If you are running a MySQL Cluster storage daemon (ndbd) on this machine,
# adjust its connection to the management daemon here.
# Note: ndbd init script requires this to include nodeid!
connect-string="nodeid=2;host=localhost:1186"

MySQL没有一个数据库的表数限制。你遇到了什么错误?

http://dev.mysql.com/doc/refman/5.5/en/database-count-limit.html

我试了很多方法,终于找到了答案。它不需要编辑 my.cnf 文件。可以使用位于专用服务器的 phymyadmin 文件夹内的 config.inc.php 文件来完成,我们可以在其中插入以下行:

$cfg['MaxTableList'] = 250;

在这里你可以设置你想要在一个数据库中的最大数量table。