You are able to view the max connections for mysql with the following command:
mysql -e 'show variables;' | grep max_connectionsOR if you log into mysql you can use the following command:
show variables like 'max_connections';You should have a similar output:
max_connections 151
You can use the following command from your shell (you do not need to log directly into mysql for this if your /etc/my.cnf file has been configured).
mysql -e 'set global max_connections = 200;'If you now grep for max connections it should show 200.
mysql -e 'show variables;' | grep max_connections
Edit the /etc/my.cnf file with the new variable settings for them to be permanent. Add the following code to the file:
[mysqld] max_connections = 1000
mysql -e 'show variables;' | grep -i max_user_connections
show variables like 'max_user_connections';