繁体   English   中英

更改mysql配置文件

[英]Changing mysql configuration file

我有专用服务器,具有centos 5,已在其中安装了mysql。 现在的问题是,我将无法在一个数据库中创建超过250个表。 我知道可以通过更改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;

在这里,您可以设置一个db内所需的最大表数。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM