By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,064 Members | 1,445 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,064 IT Pros & Developers. It's quick & easy.

How do i change max_connections and wait_timeout variables globally (for good)

P: n/a
I keep getting the famous 'Too Many Connection' Error, and don't know
how to change my variables, so they persist even if i have to restart
mysql service.

Platform: Windows 2003 Server
My Program is a WebApplication that is written in VB.Net
Using ODBC and OLEDB to connect <- (don't blame me, i just took this
over)

From what i have read so far, the problem is that i need to change
some settings to prevent my connections from being open for the
default of 8 hours.

So I am trying to change the following setting once and for all to:
max_connections=300
wait_timeout=2

(I'm not 100% sure that this is enough, but i guess i have to play
with these settings to find the right balance. We currently only have
about 400 Hits per day. Each Page is making about 1-4 calls to the
MySQL DB)

Now, if i restart the MySql Service, I don't want to have change this
again through script or whatever. I already changed the values
(actually added them) to the my.ini file, and i could not find a
my.cnf file at all.

So, is there one place that i can make this change for good? or is
there a certain syntax that i need to use? Could you please give me
some high-level instructions?

What i do know: --------------------------------------------------------------
-I do know that i would need to log on as root, and make this change.
-I do know that the service reads its values from my.ini - and
supposedly uses any overrides from a my.cnf file. (I was not able to
find the my.cnf file)
-I do have the latest (4.0) version of MySql on the server.

What i tried already:
1. I added 2 lines to the my.ini file
max_connections=300
wait_timeout=2

2. I logged on as root and ran:
SET GLOBAL max_connections=300
SET GLOBAL wait_timeout=2
Then i ran the mysqladmin.exe and created the Report of the variables:
The Report states that i got
max_connections 100
wait_timeout 28800
(Grrr!)

Also, I cannot make drastic programming or connection changes in code
because i am in the process to move the data layer over to SQL Server
2000.

Sorry for being ignorant here, i have taken this project over and am
no expert on mysql.

Please help if you have any basic instructions.
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Sami2 wrote:
I keep getting the famous íToo Many Connectioní Error, and
donít know
how to change my variables, so they persist even if i have to restart mysql service.

Platform: Windows 2003 Server
My Program is a WebApplication that is written in VB.Net
Using ODBC and OLEDB to connect <- (donít blame me, i just
took this
over)

From what i have read so far, the problem is that i need to change
some settings to prevent my connections from being open for the
default of 8 hours.

So I am trying to change the following setting once and for all to:
max_connections=300
wait_timeout=2

(Iím not 100% sure that this is enough, but i guess i have to
play
with these settings to find the right balance. We currently only have about 400 Hits per day. Each Page is making about 1-4 calls to the
MySQL DB)

Now, if i restart the MySql Service, I donít want to have change
this
again through script or whatever. I already changed the values
(actually added them) to the my.ini file, and i could not find a
my.cnf file at all.

So, is there one place that i can make this change for good? or is
there a certain syntax that i need to use? Could you please give me
some high-level instructions?

What i do know:
--------------------------------------------------------------
-I do know that i would need to log on as root, and make this change. -I do know that the service reads its values from my.ini - and
supposedly uses any overrides from a my.cnf file. (I was not able to find the my.cnf file)
-I do have the latest (4.0) version of MySql on the server.

What i tried already:
1. I added 2 lines to the my.ini file
max_connections=300
wait_timeout=2

2. I logged on as root and ran:
SET GLOBAL max_connections=300
SET GLOBAL wait_timeout=2
Then i ran the mysqladmin.exe and created the Report of the variables: The Report states that i got
max_connections 100
wait_timeout 28800
(Grrr!)

Also, I cannot make drastic programming or connection changes in code because i am in the process to move the data layer over to SQL Server 2000.

Sorry for being ignorant here, i have taken this project over and am no expert on mysql.

Please help if you have any basic instructions.


On Windows, you change the "ini" settings thru winmysqladmin
graphical interface. Open it up, and there is a tab for changing ini
settings. Restart the server and you should be ok.

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/mySQL-change...ict129017.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=433118
Jul 20 '05 #2

P: n/a
Sami2 wrote:
I keep getting the famous íToo Many Connectioní Error, and
donít know
how to change my variables, so they persist even if i have to restart mysql service.

Platform: Windows 2003 Server
My Program is a WebApplication that is written in VB.Net
Using ODBC and OLEDB to connect <- (donít blame me, i just
took this
over)

From what i have read so far, the problem is that i need to change
some settings to prevent my connections from being open for the
default of 8 hours.

So I am trying to change the following setting once and for all to:
max_connections=300
wait_timeout=2

(Iím not 100% sure that this is enough, but i guess i have to
play
with these settings to find the right balance. We currently only have about 400 Hits per day. Each Page is making about 1-4 calls to the
MySQL DB)

Now, if i restart the MySql Service, I donít want to have change
this
again through script or whatever. I already changed the values
(actually added them) to the my.ini file, and i could not find a
my.cnf file at all.

So, is there one place that i can make this change for good? or is
there a certain syntax that i need to use? Could you please give me
some high-level instructions?

What i do know:
--------------------------------------------------------------
-I do know that i would need to log on as root, and make this change. -I do know that the service reads its values from my.ini - and
supposedly uses any overrides from a my.cnf file. (I was not able to find the my.cnf file)
-I do have the latest (4.0) version of MySql on the server.

What i tried already:
1. I added 2 lines to the my.ini file
max_connections=300
wait_timeout=2

2. I logged on as root and ran:
SET GLOBAL max_connections=300
SET GLOBAL wait_timeout=2
Then i ran the mysqladmin.exe and created the Report of the variables: The Report states that i got
max_connections 100
wait_timeout 28800
(Grrr!)

Also, I cannot make drastic programming or connection changes in code because i am in the process to move the data layer over to SQL Server 2000.

Sorry for being ignorant here, i have taken this project over and am no expert on mysql.

Please help if you have any basic instructions.


On Windows, you change the "ini" settings thru winmysqladmin
graphical interface. Open it up, and there is a tab for changing ini
settings. Restart the server and you should be ok.

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/mySQL-change...ict129017.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=433118
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.