Temporary solution to maxing connections,
show variables like "max_connections";
set global max_connections = 200;
I need help with the following:
To make the change permanent you need to edit the my.cnf configuration file. Where do I find this file on my VPS? I'm not using wamp/xamp. I'm trying to make a permanent change to the max connections so I don't have to keep doing it everytime I restart Mysql.
I'm using MySQL Server 5.5 and workbench 6.3
MySQL
-
- New to forums
- Posts: 6
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Mon Sep 07, 2015 4:25 pm
Re: MySQL
The file is usually at /etc/mysql/my.cnf, or /etc/my.cnf.
There are multiple location of the config file, and mysql checks all of them when it starts up. I just did a mysql install on ubuntu 15.04 and the default config file was at the first location I listed. If your config file is not at either of those locations, you can create a new one.
There are multiple location of the config file, and mysql checks all of them when it starts up. I just did a mysql install on ubuntu 15.04 and the default config file was at the first location I listed. If your config file is not at either of those locations, you can create a new one.
Not a NFO employee
Re: MySQL
Normally "/etc/mysql/my.cnf, or /etc/my.cnf." I would right click xamp or wamp at the bottom right in the taskbar. Now, I am not using xamp or wamp. In fact, before I took over this database my friend was working on it and doesn't know either. So where would I look to find "/etc/mysql/my.cnf, or /etc/my.cnf."
Assume that I am a novice that does not know where to locate this please and thank you.
@soja
[Mention]soga[/mention] (lool).
Assume that I am a novice that does not know where to locate this please and thank you.
@soja
[Mention]soga[/mention] (lool).
Re: MySQL
Oh my bad, my instructions were for Linux. On Windows the file is called my.ini, this link should be able to help you:Noonie wrote:Normally "/etc/mysql/my.cnf, or /etc/my.cnf." I would right click xamp or wamp at the bottom right in the taskbar. Now, I am not using xamp or wamp. In fact, before I took over this database my friend was working on it and doesn't know either. So where would I look to find "/etc/mysql/my.cnf, or /etc/my.cnf."
Assume that I am a novice that does not know where to locate this please and thank you.
@soja
[Mention]soga[/mention] (lool).
http://stackoverflow.com/questions/1712 ... s-computer
Not a NFO employee
Re: MySQL
Don't put [mysqld] twice, and you might want to rename the file to my.ini. It should work.Noonie wrote:I located a file called my-default.ini
under [mysqld]
if i put
[mysqld]
max_connections = 10000;
would that be good?
Not a NFO employee
Re: MySQL
I renamed the file to my.ini and I added the statement you provided (just the one mysqld not two).
When I restarted mysql and checked the max connections through show variable etc, it displayed 151 instead of 10000. Is that normal?
When I restarted mysql and checked the max connections through show variable etc, it displayed 151 instead of 10000. Is that normal?
Re: MySQL
As the root mysql user, try running this SQL statement:Noonie wrote:I renamed the file to my.ini and I added the statement you provided (just the one mysqld not two).
When I restarted mysql and checked the max connections through show variable etc, it displayed 151 instead of 10000. Is that normal?
SET GLOBAL max_connections = 10000;
Then check the value of the variable.
Not a NFO employee
Re: MySQL
I know, I wanted to check if it changed with that statement, based on your response the answer is yes.Noonie wrote:That's a temporary solution, once you restart sql it will set back to 151 or w.e your default value is =\
Well i'm beat :S
Place the my.ini in the root of your C drive, see if that works.
Not a NFO employee