解决的方法:
登陆mysql 。运行
mysql -u root -pPasswd
mysql >grant all privileges on *.* to root@"%" identified by "Passwd"
mysql >flush privileges