修改连接数

修改连接数

临时修改

  • 进入Mysql数据库查看 max_connection_errors: show variables like '%max_connection_errors%';
  • 修改 max_connection_errors 的数量为1000: set global max_connect_errors = 1000;
  • 查看是否修改成功:show variables like '%max_connection_errors%';

永久修改

vi /etc/my.cnf
max_connections=1000
  1. 使用mysqladmin flush-hosts 命令清理一下hosts文件(不知道mysqladmin在哪个目录下可以使用命令查找:whereis mysqladmin)
/usr/bin/mysqladmin flush-hosts -h192.168.1.1 -P3308 -uroot -prootpwd
# 或者
# 进入mysql命令行
flush hosts;
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容