1. 程式人生 > >騰訊雲安裝配置Apache+MariaDB伺服器並解決SQLSTATE[HY000] [1130] Host t '*’ is not allowed to connect to this se問題

騰訊雲安裝配置Apache+MariaDB伺服器並解決SQLSTATE[HY000] [1130] Host t '*’ is not allowed to connect to this se問題

具體的安裝方式(超詳細,可直接複製命令執行):https://www.qcloud.com/community/article/321718001489545422

安裝完後會出現以下問題(如果是遠端連線的話):

問題:SQLSTATE[HY000] [1130] Host '***.**.***.***' is not allowed to connect to this MySQL server

內容這是MYSQL的許可權問題

解決方法:

  • 進入mysql:mysql -u帳號 -p密碼

  • mysql> grant all privileges on *.* to 'root'@'%'identified by 'mypassword123456';

  • mysql> flush privileges;

  • mysql> exit

  • OK