Report this

What is the reason for this report?

How do I connect to my mysql database from a remote host?

Posted on August 11, 2014

Is it possible to connect to my database remotely using jdbc, like jdbc:mysql://<myipaddress>/db? I’ve tried all the possible combinations of host/port/db/user and don’t seem to get anywhere. I created an user with phpMyAdmin that should allow connections from any host.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Please ensure your my.cnf specifies that the bind-address is not 127.0.0.1, and that skip-networking is not specified. Otherwise your mysqld is not listening on any interface that can receive traffic from a remote host.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.