473,324 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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

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
2 23783
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Moritz Steiner | last post by:
I set a lot of variables in the my.cnf file, all variables are set (I checked it with "show variables") except of wait_timeout. If I set the option in MySQL with "option wait_status=3Dxxx" it...
0
by: Moritz Steiner | last post by:
Thanks a lot, that solved my problem! Moritz -----Urspr=FCngliche Nachricht----- Von: Egor Egorov =20 Gesendet: Freitag, 18. Juli 2003 10:16 An: mysql@lists.mysql.com Betreff: Re: WG:...
1
by: Jan Josefowicz | last post by:
Hi, I'm trying to change the value of max_connections variable but mysqld doesn't accept that. I use mysql 3.23.54 and my config file /etc/my.cnf looks like: .... .... set-variable...
0
by: Sami | last post by:
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...
1
by: konf | last post by:
Hallo, I am using PostgreSQL 7.4 on UltraSparc machine and I have a touble with max_connections param. I must set only max_connections to 8, when I set more, I got error for shared memory. ...
13
by: Sunil | last post by:
Hi all, I want to know how good or bad it is using global variables i.e advantages and disadvantages of using global variables. Sunil.
5
by: Tee | last post by:
Hi, In VB, we can add a module to put all the variables and functions, do we have something similar in C#? Thanks
27
by: thomasp | last post by:
Variables that I would like to make available to all forms and modules in my program, where should I declare them? At the momment I just created a module and have them all declared public there. ...
55
by: Zytan | last post by:
I see that static is more restricted in C# than in C++. It appears usable only on classes and methods, and data members, but cannot be created within a method itself. Surely this is possible in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.