Enabling remote connection of MySQL on Ubuntu

Linux, MySQL, Ubuntu, 2015-06-17 00:16:48 UTC

1. open mysql configuration

$ sudo nano /etc/mysql/my.cnf



2. We need to comment out the bind-address and skip-external-locking lines:

#bind-address = 127.0.0.1
# skip-external-locking



3. Restart MySQL to make changes;

sudo service mysql restart



4. Grant permission to root from any host:

$ mysql –u root -p

mysql> GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;



5. Don't forget to configure that port 3306 can be accessed from anywhere. You can use Uncomplicated Firewal for this


Share: