MySQL allow external connections

Grant privileges

Under root user execute:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';
Bind to all addresses

Edit your my.cnf, generally located in bind-address = 127.0.0.1.

  • /etc/my.cnf
  • /etc/mysql/my.cnf
  • $MYSQL_HOME/my.cnf
  • [datadir]/my.cnf
  • ~/.my.cnf
#bind-address = 127.0.0.1

Restart mysql

service mysql restart

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.