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

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.