Home >Backend Development >PHP Tutorial >The solution to Access denied for user root@localhost using password:YES in mysql is implemented by myself

The solution to Access denied for user root@localhost using password:YES in mysql is implemented by myself

WBOY
WBOYOriginal
2016-07-29 09:06:511835browse

Change the ROOT password under DOS: Of course, you can also change the password after installing PHPMYADMIN later through PHPMYADMIN

Format: mysqladmin -u username -p old password password new password

Example: Add a password to root 123

First enter the CMD command line, path to check the bin location of mysql; then go to the bin directory under the MYSQL directory, and then type the following command

mysqladmin -u root password 123

Note: Because At the beginning, root did not have a password, so the -p old password item can be omitted.

D:phpMySQLbin>mysqladmin-uroot password ideacmblog After pressing Enter, the ROOT password is set to 123

The above introduces the solution to Access denied for user root@localhost using password:YES in mysql, which I have implemented in practice, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn