最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

解決mysql數(shù)據(jù)庫設(shè)置遠程連接權(quán)限執(zhí)行g(shù)rant all privileges on *.* to 'root'@'%' identified by '密碼' with grant optio報錯

 更新時間:2022年11月06日 11:47:21   作者:王克兵  
這篇文章主要介紹了解決mysql數(shù)據(jù)庫設(shè)置遠程連接權(quán)限執(zhí)行g(shù)rant all privileges on *.* to 'root'@'%' identified by '密碼' with grant optio報錯,通過本文給大家分享問題原因解析及解決方法,需要的朋友可以參考下

mysql數(shù)據(jù)庫設(shè)置遠程連接權(quán)限,執(zhí)行g(shù)rant all privileges on *.* to 'root'@'%' identified by '密碼' with grant optio報錯

ERROR1558 (HY000): Column count ofmysql.user is wrong. Expected 43, found 42. Created with MySQL 50556, now running 50639. Please use mysql_upgrade to fix this error.

解決辦法:

使用命令:mysql_upgrade -u[username] -p[password]就可以解決。

使用mysql_upgrade對數(shù)據(jù)庫的數(shù)據(jù)表結(jié)構(gòu)等升級時,數(shù)據(jù)庫引擎MyISAM 會做檢查、修復(fù)的動作,InnoDB 執(zhí)行 mysql_upgrade 沒有作用。

查找MySQL的安裝目錄找到mysql_upgrade :

  • whereismysql_upgrade
  • cd /usr/bin/
  • ./mysql_upgrade -uroot -p123 (123為密碼)

然后進入到mysql再執(zhí)行權(quán)限修改即可:grant all privileges on *.* to 'root'@'%' identified by 'root4xml004a' with grant option;

如:

mysql中遠程連接權(quán)限語句grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘123456‘ with grant optio報錯

grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘123456‘ with grant optio

原因: mysql的版本問題,這條語句適用于MySQL8.0之前

解決: mysql8.0及以上版本需要使用以下語句:

create user root@'%' identified by '123456';
grant all privileges on *.* to root@'%' with grant option;

到此這篇關(guān)于解決mysql數(shù)據(jù)庫設(shè)置遠程連接權(quán)限執(zhí)行g(shù)rant all privileges on *.* to 'root'@'%' identified by '密碼' with grant optio報錯的文章就介紹到這了,更多相關(guān)mysql遠程連接權(quán)限內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評論

澄城县| 潜江市| 集贤县| 景东| 凌源市| 海门市| 竹山县| 潢川县| 和平县| 邵阳县| 浦县| 乐至县| 鹤壁市| 慈利县| 封丘县| 乐安县| 兴城市| 宁蒗| 宽城| 灵石县| 马关县| 筠连县| 新郑市| 西乌珠穆沁旗| 个旧市| 灯塔市| 英吉沙县| 华池县| 四会市| 民丰县| 临颍县| 镇康县| 修武县| 色达县| 郧西县| 双柏县| 曲沃县| 安丘市| 元谋县| 武清区| 石家庄市|