java.sql.SQLException: null, message from server: 「Host ‘xxx’ is not allowed to connect異常解決

表示不能被容許遠程訪問,ip地址必須是localhost或者127.0.0.1,就算是局域網內也不行。mysql 出現此異常的緣由通常是在遷移項目後,只要你項目的數據庫配置文件下的ip不是localhost或者127.0.0.1,就會出現此錯誤。sql 因此容許任何主機訪問數據庫就好了。數據庫 管理員打開cmd -->進入mysqlwindows mysql -u root -p服務器 roots
相關文章
相關標籤/搜索