srihari Posted September 3, 2017 Posted September 3, 2017 (edited) Hi, i am also having the same problem. just after creating a database i using my program to test the connection for the first time. i am getting this error com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: User srihari9_test already has more than 'max_user_connections' active connections and i am sure this is my is my first time i am creating a connection. i not even opened phpmyadmin, deleted db and create new one same there. mydomain is srihari92.heliohost.comuser mail : srihari92@ymail.com how can i close the connections that are opened using cpanel. or how can i make limit higher (like 15) i am doing an experiment may have aleat 3 to 5 active connections kindly help. kindly help. Edited September 3, 2017 by srihari
Krydos Posted September 3, 2017 Posted September 3, 2017 Your account does not currently have any open mysql connections.
srihari Posted September 5, 2017 Author Posted September 5, 2017 hi admin, spring.datasource.url=jdbc:mysql://srihari92.heliohost.org:3306/srihari9_bhrigubhavvspring.datasource.username=srihari9_bhrigub this is the configuration i am using to connect to the db with my local dev environment and allowed remote access. com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: User srihari9_bhrigub already has more than 'max_user_connections' active connections at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_131] at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.8.0_131] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.8.0_131] at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[na:1.8.0_131] at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) ~[mysql-connector-java-5.1.43.jar:5.1.43] at com.mysql.jdbc.Util.getInstance(Util.java:408) ~[mysql-connector-java-5.1.43.jar:5.1.43] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943) ~[mysql-connector-java-5.1.43.jar:5.1.43] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973) ~[mysql-connector-java-5.1.43.jar:5.1.43] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909) ~[mysql-connector-java-5.1.43.jar:5.1.43] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:873) ~[mysql-connector-java-5.1.43.jar:5.1.43] at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1710) ~[mysql-connector-java-5.1.43.jar:5.1.43] at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1226) ~[mysql-connector-java-5.1.43.jar:5.1.43] i am using hibernate and spring (java) to connect to this db. kindly help
Krydos Posted September 5, 2017 Posted September 5, 2017 Try this jdbc:mysql://srihari92.heliohost.org:3306/srihari9_bhrigubhavv?max-connections=1
srihari Posted September 7, 2017 Author Posted September 7, 2017 (edited) Dear admin, From spring boot, i am still getting the same error after changing the URL. so i tried using PHP and normal java to connect with DB. the result is success. i even tried this configurations in spring spring.datasource.maxActive=2spring.datasource.max-active=2spring.datasource.initial-size=1spring.datasource.max-idle=3spring.datasource.min-idle=1 do i need any special permission to connect via spring boot (java)? kindly help. Edited September 7, 2017 by srihari
Krydos Posted September 7, 2017 Posted September 7, 2017 Other people have used spring and database connections without issues.
Recommended Posts