Like it!

Join us on Facebook!

Like it!

How to enable remote MySQL access on Debian

How to allow remote connections from any host to your MySQL server.

This MySQL walkthrough is designed for any Debian-based distribution.

Step 1: open /etc/mysql/my.cnf.

Step 2: comment out the bind-address line, which tells MySQL where to listen. If you remove it, MySQL will accept any connection. You could also assign an IP address like bind-address = <ip-here> if you wish to give access to a specific machine. Comment it out otherwise.

Step 3: restart the mysql service with sudo service mysql restart.

Step 4: finally, grant permission to MySQL users from any host:

GRANT ALL PRIVILEGES ON *.* TO <your-user-here>@'%' IDENTIFIED BY '<user-password-here>'; FLUSH PRIVILEGES;



MySQL - MySQL 5.7 Reference Manual: Server Command Options (link)