recently i create school project which was web app that has tomcat as server and use mysql database, it work properly in my local system but when i want to run it on my vps, i get this error:

the err

i had the same problem when i try to clone my project to my friend's computer, and we solve it by create the user (admin@localhost) by phpmyadmin in his computer, but i cant solve this problem when i create user in my vps's phpmyadmin.

this is my app's property to connect to DB:

jdbc.driverClassName = com.mysql.jdbc.Driver
jdbc.url = jdbc:mysql://localhost:3306/normalizedDB
jdbc.username = admin
jdbc.password = admin
hibernate.dialect = org.hibernate.dialect.MySQLDialect
hibernate.show_sql = false
hibernate.format_sql = false

and this is my db on xampp and the open ports at my vps:


plz tell me how can i create that 'admin' user

I added this lines separately to my.cnf to handle all ipv6 things and give all priviledge to admin@localhost but still tomcat says 'HTTP Status 500 Could not open connection' and i have to say that my db has data too ...

bind-address = ::1
bind-address = ::
bind-address = 'localhost'
  • First of all , if you are running your webapp(which works fine in your local system) from a VPS , did you have install MySQL or Maria DB server in VPS and ported your dump in vps? Or you want to connect your VPS to connect the DB in your local machine ? Kindly make clear.
    – SAGAR Nair
    Aug 25, 2016 at 17:34

1 Answer 1


Doube colons " :: " are for tcp6 , that is IPv6. For a IPv4 there will be only one colon before port " : ".

  • tnx, could u tell me how can i set xampp's mysql to listen on localhost instead of what it has now in ipv6 form?
    – Lord ST
    Aug 25, 2016 at 18:47
  • or how can i set my web app's property to 'localhost' instead of '::' ???
    – Lord ST
    Aug 25, 2016 at 19:11
  • or how can i set my web app's property to '' instead of '::' ???
    – Lord ST
    Aug 25, 2016 at 19:15
  • Do you mean you want to know how to set up webapp in your VPS ?
    – SAGAR Nair
    Aug 25, 2016 at 20:01
  • somehow, i set up tomcat correctly but the xampp's mysql doesn't respond to webapp ...
    – Lord ST
    Aug 25, 2016 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.