Under Linux mysql modify the default maximum number of connections

modify the maximum number of connections mysql (under test by Centos) under liunx

1, see mysql set up under the current system the maximum number of connections

the way a,

mysqladmin -p-uroot-the Variables | grep max_connections

 

 

Second way,

/ usr / bin / mysqladmin -p-uroot-the Variables | grep max_connections

entered into the database password, and then replace their root database user name, a password is required to view the database, again.


2, vi /etc/my.cnf edit files

Press enter input mode i 
Press esc to exit 
enter: wq to save and exit

Was added [mysqld] in: max_connections = 1000   




3, restart the mysql service: service mysqld restart 


tips, and not your mysql concurrent setting the bigger the better, we need to adjust the high number of concurrent site according to their own server and site status.

Guess you like

Origin www.cnblogs.com/tomingto/p/11527890.html