3

I have a droplet on digital ocean, but how am I suppose to connect to the mysql server on my droplet? When I try to connect to the IP with my mysql credentials it's not working. Do I have to enter something else as hostname?

guidsen
  • 2,333
  • 6
  • 34
  • 55
  • 1
    If you're using the DigitalOcean LAMP one-click app, the MySql server is only available on localhost by default. To enable remote connections check out: http://stackoverflow.com/questions/8380797/enable-remote-mysql-connection – andrewsomething Sep 18 '14 at 17:02

3 Answers3

1

From console execute:

sudo nano /etc/mysql/my.cnf

Then edit section [mysqld], change this line:

bind-address = 127.0.0.1

To this:

bind-address = 0.0.0.0
Guillermo Garcia
  • 2,396
  • 1
  • 18
  • 23
0

Use localhost as server in MySQL connection string.

Silvio Delgado
  • 6,798
  • 3
  • 18
  • 22
0

Add port 3306 (default port) to the address if you don't have it.

kenfire
  • 1,305
  • 12
  • 23