命令依次如下:
mysql -u root -p use mysql; select host,user,password from user; grant all privileges on *.* to root@'%' identified by "password"; flush privileges; select host,user,password from user;
之后就可以用 MySQL 的客户端工具(如:Navicat)远程访问了,
数据库连接的用户名和密码为:root/password