【问题标题】:Changing mysql configuration file修改mysql配置文件
【发布时间】:2015-01-13 12:26:04
【问题描述】:

我有专门的服务器有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 my.cnf dedicated-server


    【解决方案1】:

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

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

    【讨论】:

      【解决方案2】:

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

      $cfg['MaxTableList'] = 250;
      

      这里你可以设置一个db内的最大表数。

      【讨论】:

        猜你喜欢
        • 2020-04-14
        • 2017-11-24
        • 2012-12-25
        • 1970-01-01
        • 1970-01-01
        • 2013-03-09
        • 1970-01-01
        • 2014-05-15
        • 1970-01-01
        相关资源
        最近更新 更多