mysql -u root -p [此时会要求你输入刚刚设置的密码,输入后回车即可 mysql> DROP DATABASE test; [删除test数据库] mysql> DELETE FROM mysql.user WHERE user = ”; [删除匿名帐户] mysql> FLUSH PRIVILEGES; [重载权限] mysql> GRANT ALL PRIVILEGES ON *.* TO ‘root'@'192.168.1.13′ IDENTIFIED BY ‘密码' WITH GRANT OPTION; [增加远程链接用户]