解決遠程訪問阿里雲的mysql服務器問題

解決不能遠程訪問mysql的問題

  • 首先需要開放阿里雲的安全組端口:mysql的默認端口是3306,在控制檯添加安全組規則,使的3306的端口開放

  • 然後把mysql上的配置改一下,使他能接受連接
    不然會出現:1130 - Host XXX is not allowed to connect to this MySQL server
    mysql -uroot -p密碼
    show databases;
    use mysql;
    select host from user where user=‘root’;
    update user set host = ‘%’ where user =‘root’
    flush privileges;
    select host from user where user=‘root’;

    這樣就完成了修改,可以進行遠程的訪問連接了。

參考連接:https://blog.csdn.net/weixin_44092289/article/details/88539614

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