idea中啓動項目報錯:java.sql.SQLException: null, message from server: “Host ‘xxx’ is not allowed to connect

簡述:找一個開源項目運行時報如下錯
報錯如下:

java.sql.SQLException: null, message from server: "Host 'CY-20210506FCUE' is not allowed to connect

解決方式:修改訪問權限即可
打開cmd,進入mysql

mysql -uroot -p
select user,host from user;
flush privileges; (將權限更新操作刷新到內存中)

具體如圖:



打開服務,重新啓動mysql服務


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章