Open Port 3306 in ubuntu 12.04 to allow connections to mysql from any ip


server running on a server and I wanted to know how to Open a Port 3306 in ubuntu 12.04 to allow connections to mysql from any ip

mysql> select user,host from mysql.user; GRANT ALL ON *.* to user@’%’ IDENTIFIED BY ‘user-pwd’;
mysql> FLUSH PRIVILEGES;
mysql> select user,host from mysql.user;
mysql>quit
Also need to comment out or change the bind-address to . This does reduce security.
sudo nano /etc/mysql/my.cnf
;bind-address=127.0.0.1
exit and
$service mysql start
$service mysql stop


Leave a Reply