CentOS下MySQL最大串連數設定 1040 too many connection

來源:互聯網
上載者:User

CentOS下MySQL最大串連數設定 1040 too many connection

CentOS下MySQL最大串連數設定 1040 too many connection

當最大串連數比較小時,可能會出現“1040 too many connection”錯誤。

可以通過修改設定檔來修改最大串連數,但我連設定檔在哪都不知道,應該怎麼辦呢?

首先需要重啟mysql服務,執行命令:service mysql restart

也有可能是:service mysqld restart

登入mysql:mysql -uroot -p
輸入密碼,斷行符號;

登入成功後執行以下語句查詢當前的最大串連數:
select VARIABLE_VALUE from information_schema.GLOBAL_VARIABLES where VARIABLE_NAME='MAX_CONNECTIONS';

執行以下語句修改最大串連數:
set global max_connections = 3600;

--------------------------------------分割線 --------------------------------------

Ubuntu 14.04下安裝MySQL

《MySQL權威指南(原書第2版)》清晰中文掃描版 PDF

Ubuntu 14.04 LTS 安裝 LNMP Nginx\PHP5 (PHP-FPM)\MySQL

Ubuntu 14.04下搭建MySQL主從伺服器

Ubuntu 12.04 LTS 構建高可用分布式 MySQL 叢集

Ubuntu 12.04下原始碼安裝MySQL5.6以及Python-MySQLdb

--------------------------------------分割線 --------------------------------------

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.