mysql> grant all privileges on *.* to \'root\'@\'@\' with grant option; ERROR 1105 (HY000): Malformed hostname (illegal symbol: \'@\') mysql> grant all privileges on *.* to \'root\'@\'%\' with grant option; Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
[root@localhost ~]# service mysql restart
Shutting down MySQL.. SUCCESS!
Starting MySQL.. SUCCESS!
重启mysql即可远程登陆。