mysql_maxconnections
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mysql_maxconnections [2015/04/07 08:26] – luke7858 | mysql_maxconnections [2024/05/23 07:26] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 5: | Line 5: | ||
OR if you log into mysql you can use the following command: | OR if you log into mysql you can use the following command: | ||
<sxh bash> | <sxh bash> | ||
- | show variables like ' | + | show variables like ' |
</ | </ | ||
You should have a similar output: | You should have a similar output: | ||
Line 15: | Line 15: | ||
\\ | \\ | ||
===Option 1 === | ===Option 1 === | ||
- | You can use the following command from your shell (you do not need to log directly into mysql for this if your .my.cnf file has been configured). | + | 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). |
<sxh bash> | <sxh bash> | ||
mysql -e 'set global max_connections = 200;' | mysql -e 'set global max_connections = 200;' | ||
Line 25: | Line 25: | ||
\\ | \\ | ||
=== Option 2 === | === Option 2 === | ||
- | Edit the .my.cnf file with the new variable settings for them to be permanent. Add the following code to the file: | + | Edit the /etc/my.cnf file with the new variable settings for them to be permanent. Add the following code to the file: |
<sxh bash> | <sxh bash> | ||
[mysqld] | [mysqld] | ||
max_connections = 1000 | max_connections = 1000 | ||
+ | </ | ||
+ | \\ | ||
+ | --------------------------------------------------------------- | ||
+ | \\ | ||
+ | === Setting max user connections === | ||
+ | <sxh bash> | ||
+ | mysql -e 'show variables;' | ||
+ | </ | ||
+ | \\ | ||
+ | <sxh bash> | ||
+ | show variables like ' | ||
</ | </ |
mysql_maxconnections.1428395202.txt.gz · Last modified: 2024/05/23 07:26 (external edit)