1

我有专门的服务器,有 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"
4

2 回答 2

0

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

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

于 2015-01-14T19:47:00.713 回答
0

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

$cfg['MaxTableList'] = 250;

在这里您可以设置一个数据库中所需的最大表数。

于 2015-01-17T07:24:51.387 回答