參考的文檔
[Mysql報錯is not allowed to connect解決辦法] (https://blog.csdn.net/wohiusdashi/article/details/81174302)
遇到的問題是HeiDiSql工具root用戶名登錄失敗
解決方式
1.選擇mysql數(shù)據(jù)庫
use mysql;
select host from user;
update user set host ='%' where user ='root';
2、重啟mysql
service mysql stop
service mysql start