How do I connect to MySQL from a remote host? Print

  • 24

To be able to connect to MySQL server from a remote host, you need to edit /etc/my.cnf and make sure you have:


# Comment bind-address or make sure it has your server IP address
# bind-address =

# this line must be commented to allow remote network connections
# skip-networking

After making these changes, restart mysql with

$ service mysql restart


Than add a user that can connect from a remote IP address.

Was this answer helpful?

« Back