SQLSTATE[HY000] [1130] Host '127.0.0.1' is not allowed to connect to this MySQL server怎麼解決?

登錄的用戶名不可以在127.0.0.1這個ip登錄,如果要用這個用戶登錄就創建一個吧,create user 'username'@'127.0.0.1' identified by 'password'; #創建名爲username,主機爲127.0.0.1,密碼爲password的用戶grant all on *.* to 'username'@'127.0.0.1'; #賦予所有權限
相關文章
相關標籤/搜索