MySQL Forums
Forum List  »  Newbie

Re: SQLSTATE[08004] [1040] Too many connections
Posted by: Mark Hunkler
Date: September 01, 2011 04:47PM

Ok I have figured out how to use these commands, after lots of frustrating searching, of course it was simple just not that easy to find, (for any other newbie, to get the "mysql command line", you have to first in SSH type "mysql -u root -p" and change root to whatever username has proper privileges, root did not work for me, i used admin, as you will see below I think this was an issue in getting the results i was looking for).

Here are the results of the commands you said to check...

mysql> SHOW PROCESSLIST;
+-------+-------+-----------+------+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-------+-------+-----------+------+---------+------+-------+------------------+
| 12678 | admin | localhost | NULL | Query | 0 | NULL | SHOW PROCESSLIST |
+-------+-------+-----------+------+---------+------+-------+------------------+
1 row in set (0.02 sec)


mysql> SHOW GLOBAL VARIABLES LIKE '%connections';
+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| max_connections | 151 |
| max_user_connections | 0 |
+----------------------+-------+
2 rows in set (0.00 sec)


mysql> SHOW STATUS LIKE '%connect%';
+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| Aborted_connects | 6 |
| Connections | 12913 |
| Max_used_connections | 65 |
| Ssl_client_connects | 0 |
| Ssl_connect_renegotiates | 0 |
| Ssl_finished_connects | 0 |
| Threads_connected | 2 |
+--------------------------+-------+
7 rows in set (0.00 sec)

I still don't see how i am able to see which connections are in sleep. I think i'm missing something when you say "You need a user with SYSTEM privilege for this." are you taking about the user i used to access the mysql command line, when i typed in ssh "mysql -u root -p" ... How do I create a user with the proper access that I need to see these connections?

But yea it looks like there is an awful lot of connections, 12913?

What do you suggest I do from here?

Thanks again for your help.. I think i'm finally getting somewhere!

Options: ReplyQuote


Subject
Written By
Posted
Re: SQLSTATE[08004] [1040] Too many connections
September 01, 2011 04:47PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.