2013-09-14

Remote root access permission for MySQL server on Ubuntu

After install mysql server on Ubuntu.

Enter mysql console by root
mysql -u root
Set password for root
SET PASSWORD FOR 'ROOT'@'LOCALHOST'
= PASSWORD('my_root_password');
Grant remote permission for root
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'
IDENTIFIED BY 'my_root_password' WITH GRANT OPTION;
Flush setting
FLUSH PRIVILEGES;
Exit mysql console
exit
Edit mysql config file
vi /etc/mysql/my.conf
Search for keyword bind-address, make sure your mysql service can be access by your local PC.
bind-address = 0.0.0.0 

No comments: