Help - Search - Members - Calendar
Full Version: how to set the MAX connection of mySQL
The Planet Forums > Control Panels > Plesk
Jonney
my site always over the default mySQL max connection ,
can anyone tell me how to increase the mySQL max connection.

which file should i modify ?
Squire
(This is with a standard install of Plesk 2.5 in mind)

When logged in as root try to locate a file called my.conf on your machine.

#locate my.conf

If it's not there (most likely it's not if you haven't already been tweaking something) create one in the /etc directory.

#cd /etc
#pico my.conf

Type the following into this new file:

[mysqld]
set-variable = max_connections=250

Changing the 250 to whatever number of maximum connections you want it to be. Don't get too carried away though. (FYI, I believe that the Max for a default MySQL installation is 100 which gives you a reference point.) You can also use this same file to tweak any other default MySQL settings you want.

Ctrl+X to exit editing the file and save it.

Restart MySQL

#/usr/local/psa/rc.d/mysqld restart

That should do it.

Squire
Ronny
It should be my.cnf not my.conf
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.