mabaomsi Posted June 30, 2017 Posted June 30, 2017 (edited) Hi!I have a big problem. I want to change the max_user_connection variable on my Mysql server, but soon with the connection i have problem.I use MySQL Command Line 5.7 to change this value. With this codes: mysql> -h mabaomsi.heliohost.org -u 'my user name' -p 'my password' maba_jpo THEN WITH THIS FORM: mysql> -u 'my user name' -p 'my password' -h mabaomsi.heliohost.org maba_jpoBut the Command Line have a syntax problem with this codes: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-u 'my user name' -p 'my password' -h mabaomsi.heliohost.org maba_jpo' at line 1 Can someone help me?Thanks! Edited June 30, 2017 by mabaomsi
wolstech Posted June 30, 2017 Posted June 30, 2017 We don't allow the max_user_connections value to be changed. If you're opening enough connections to need to increase it, your code is probably poorly written anyway. Usually exceeding the connection limit is because the code not closing its connections when its done using them. As for connecting with the command line tools, you need to pass those arguments on the command line, not inside the mysql program. Exit mysql, then run mysql -u <user> -p <password> -h <host> from your terminal.
mabaomsi Posted July 4, 2017 Author Posted July 4, 2017 Hi! But why?I really need it, i have / maked an WinForm applikation, who users can see the components from a simulation game (OMSI2), and the value 1 for max_conn. is nothing, min 10-30 poeople will used my app (i hope) in the same time from one/this database. And this wanna bee really shit, when the another 9-29 users cant connect, becuse one is now seen the database... You understand me? I really need to change it I my app, will all connections closed, when the command is runned sucesfully (f.e: SELECT * FROM blabla WHERE blabblabla = blabblabla)Can you help me, can we solved my problem? Thanks all!
Krydos Posted July 4, 2017 Posted July 4, 2017 Well designed code doesn't need that many mysql connections. If each connection is open for a few milliseconds and then immediately closed it's highly unlikely that you would ever see that error. We have plenty of well designed sites that use our hosting that have thousands of visitors per hour and don't complain about that error. There is really no good reason to use persistent connections in this situation.
mabaomsi Posted July 4, 2017 Author Posted July 4, 2017 OK. Then i need only ONE connection for all commands, and reading?
Krydos Posted July 4, 2017 Posted July 4, 2017 The default limit is 4 simultaneous connections per user.
mabaomsi Posted July 4, 2017 Author Posted July 4, 2017 Aham, okey. Then, when i use one connection ("for all") then more then tausend of poeopls can see (read) my database in the same time?
Krydos Posted July 4, 2017 Posted July 4, 2017 If each connection is open for a few milliseconds and then immediately closed it's highly unlikely that you would ever see that error.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now