This problem was encountered when installing MySQL service under Windows, which was installed with MySQL green version. After installation, when connecting to MySQL service, enter the command “mysql-uroot-p”. Because the password was not set for the first login, the error message was as follows:
“ERROR 1045 (28000): Access Denied for user ‘root’@’localhost’ (using password: NO)”
The diagram below:
Solutions:
First you need to turn off the MySQL service and enter the command:
mysql> net stop MySQL
To start the local MySQL service in safe mode (note: launch the CMD window as an administrator), enter the command “MySQld — Defaults file=”G:\Install_Applications\ mysql.8.0.11 \ My.ini” –console –skip-grant — tables “to start the MySQL service, the cursor will stop without any output, which indicates that the MySQL service has been started.
Start the CMD window, and enter the command “mysql-uroot-p” to directly enter and log in to the mysql server, and then modify, you can enter the command:
(before 5.7.11) & GT; update user set password=password(“123456″) where user=”root”;
(5.7.11 or later) & GT; update user set authentication_string=password(“123456″) where user=”root”;
Here I’m using:
mysql> ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘HuaZai12345! ‘;
The diagram below:
Now exit, enter the command “mysql-uroot-p” and enter the password just set, and you can log in to the mysql server normally, as shown in the figure below:
Ok, this is the solution for ERROR 1045 (28000): Access Denied for user ‘root’@’localhost’ (using password: NO). If you have any questions, please feel free to leave me a message.
: “learn together, make progress together”, I also hope that we will pay more attention to the IT community of CSND.
Read More:
- Error 1045 (28000): access denied for user ‘root’ @’localhost ‘(using password: no)
- ER_ACCESS_DENIED_ERROR: Access denied for user ‘root‘@‘localhost‘ (using password: NO)
- MySQL startup problem (ERROR 1045 (28000): Access denied for user’ODBC’@’localhost’ (using password: NO))
- ERROR 1045 (28000): Access denied for user’ODBC’@localhost (using password: NO)209150;’211503;’
- Solve MySQL error 1698 (28000): access denied for user ‘root’ @’localhost ‘
- MySQL connection error access denied for user ‘root’ @ ‘localhost‘
- Error 1045 (28000) access denied for user ‘root’ @’localhost ‘appears in MySQL under Windows system
- Error code 1045, state 28000, Java sql.SQLException :Access denied for user ‘root’@’localhost’
- Idea access denied for user ‘xxx’ @ ‘localhost’ solution
- Linux-mysql8.0 password reset problem – error 1396 (HY000): Operation alter user failed for ‘root’ @’localhost ‘
- ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘mysql’
- How to Fix failed to Connect to MySQL at localhost:3306 with user root
- Make the root user login through SSH and report the error of “permission denied, please try again”
- MySQL forgot the root password
- Remote: http basic: access denied, fatal: authentication failed for error resolution: wrong password
- Solution of invalid username / password; login denied error in Oracle Database Foundation
- MySQL Access denied
- Error in Git operation: http basic: access denied solution
- [MySQL] error 1396 (HY000): Operation create user failed for ‘MySQL’ @’localhost ‘
- Root password of windows 10 WSL Ubuntu system