service mysqld start;
mysql
grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
delete from user where host!='%';
之后重启服务或者在mysql中:flush privileges;
登陆命令:mysql -uroot -p