Sometimes we need to open MySQL for remote connection. To do this, we can create file “/etc/my.cnf” or modified it if exists.
The key here is:
1 2 3 | [mysqld] skip-external-locking bind-address = 0.0.0.0 |
And you need to access your MySQL console and grant remote user by:
1 | GRANT ALL PRIVILEGES ON *.* TO root@’%’ IDENTIFIED BY ‘YOUR_PASSWORD’ WITH GRANT OPTION; |
And last step is restart the MySQL services by “sudo service mysqld restart”