MySQL 5.7.16 修改密碼提示 ERROR 1054 (42S22): Unknown column ''password'' in ''field list''的原因
按照網(wǎng)上之前版本的操作,將my.ini中的skip-grant-tables注釋去掉,然后在命令行中以mysql -u root -p可以直接進(jìn)入,但是執(zhí)行
mysql> update mysql.user set password=password('password') where user='root';
會(huì)出現(xiàn)以下錯(cuò)誤
mysql> ERROR 1054 (42S22): Unknown column 'password' in 'field list'
錯(cuò)誤原因:mysql數(shù)據(jù)庫(kù)下已經(jīng)沒(méi)有password這個(gè)字段了,password字段改成了authentication_string。
mysql> update mysql.user set authentication_string=PASSWORD('password') where Use
r='root';
Query OK, 1 row affected, 1 warning (0.15 sec)
Rows matched: 1 Changed: 1 Warnings: 1
之后,記得注釋掉my.ini中的skip-grant-tables。
最后,操作完后重新啟動(dòng)mysql服務(wù),便可以用之前設(shè)置好的密碼登錄了。
以上所述是小編給大家介紹的MySQL 5.7.16 修改密碼提示 ERROR 1054 (42S22): Unknown column ''password'' in ''field list''的原因,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
相關(guān)文章
mysql root密碼的重設(shè)方法(親測(cè)可用)
深度解析MySQL啟動(dòng)時(shí)報(bào)“The server quit without up
MySQL-tpch 測(cè)試工具簡(jiǎn)要手冊(cè)
MySQL實(shí)現(xiàn)當(dāng)前數(shù)據(jù)表的所有時(shí)間都增加或減少指定的時(shí)間間隔(推薦)
深入理解MySQL主從復(fù)制線程狀態(tài)轉(zhuǎn)變

