How to Null Your Root Password in MySQL
If you desire to remove the password requirement for your MySQL root user, follow the steps outlined below:
Connect to the 'mysql' Database: Use the following command to connect to the 'mysql' database:
use mysql;
Update Root User: Execute the following query to change the root user's password to null:
update user set authentication_string=password(''), plugin='mysql_native_password' where user='root';
Once completed, you should now be able to connect to MySQL as the root user without a password.
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3