27 Feb, 2016

Enable access to MySQL/MariaDB from any host in Linux

Commands:

  • sudo nano /etc/mysql/my.cnf
  • Look for [mysqld] and bind-address
  • Edit the new address that matches your desired ip address (0.0.0.0 for all)
  • sudo service mysql restart
  • mysql –uremoteuser -premoteuserpassword
  • GRANT ALL ON *.* TO remoteuser@’%’ IDENTIFIED BY ‘remoteuserpassword’;
  • FLUSH PRIVILEGES;

Source:
http://askubuntu.com/questions/159053/mysql-server-not-accessible-from-remote-machine