Get the App
SLTechnology News&Howtos  ›  Database  › 

What if MySQL forgets the superuser password?

Shulou Source: shulou.com Published: 2022-05-31 21:36:03 11月15日 Update

This article mainly explains "what to do when MySQL forgets the superuser password". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what to do if MySQL forgets the superuser password".

If MySQL is running, kill it first: killall-TERM mysqld. Start MySQL:bin/safe_mysqld-- skip-grant-tables & and you can enter MySQL without a password. Then there is > use mysql > update user set password=password ("new_pass") where user= "root"; > flush privileges; kills MySQL again and starts MySQL in the normal way. [@ more@]

Thank you for your reading, the above is the content of "MySQL forgets the superuser password". After the study of this article, I believe you have a deeper understanding of how to forget the superuser password of MySQL, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Password what to do users learning content that is passwords ideas situations articles methods more knowledge knowledge points articles follow questions practice push Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Docker NVidia Shulou Technology vpn