我密碼忘記了,用這個進了mysql
mysqld --console --skip-grant-tables --shared-memory
然后用下面這個修改密碼,修改成功,但密碼沒有加密,是明文。
update user set authentication_string='Js123456' where user='root';
用明文密碼,mysql -u root -p, 去登錄,一直報ERROR 1045錯誤。 查了百度,說密碼要用加密函式password()
然后用下面這條陳述句修改密碼,
update user set authentication_string=password('123456') where user='root';
老是報錯
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('Js123456') where user='root'' at line 1
版本是8.0.16,哪位大神能幫幫我? 謝謝了
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/248254.html
標籤:MySQL
