在liunx辦事器上登錄數據庫,號令:mysql -u root -p 如下圖所示:
查詢user表,發現root默認是localhost,號令:select user,host from user; 如下圖所示:
更新root權限,號令:update user set host='%' where user='root'; 如下圖所示:
最后,刷新設置裝備擺設使其生效,號令:flush privileges; 如下圖所示:
再次毗連,顯示當作功。注重:SSH下用戶名暗碼是登錄辦事器的賬號暗碼,不是數據庫的賬號暗碼。
END0 篇文章
如果覺得我的文章對您有用,請隨意打賞。你的支持將鼓勵我繼續創作!