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