Home >Database >Mysql Tutorial >How to Remove the Root Password Requirement in MySQL?
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.
The above is the detailed content of How to Remove the Root Password Requirement in MySQL?. For more information, please follow other related articles on the PHP Chinese website!