473,395 Members | 1,679 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,395 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 23787
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.