Mysql操作命令 :

mysql -uroot -p

show databases;

use mysql;

show tables;

select host,user from user;

使用mysql数据库(真正的数据库,而非数据库软件),将所有数据库的所有表(*.*)的所有权限(all privileges),授予通过任何ip(%)访问的root用户,密码为123456,最后刷新(flush privileges)即可

grant all privileges on *.* to 'root'@'%' identified by '123456';

flush privileges;

有防火墙的点此链接