ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password:yes)
so
1. Stop mysql service
systemctl stop mysqld.service
2, modify the profile to log in without password
[HTML] view plain copy
-
- vi/etc/my CNF </ ol>
Add it at the end
[HTML] view plain copy
-
-
- skip – grant – tables </ ol>
-
-
-
- save
-
3. Start mysql
[HTML] view plain copy
-
-
-
- systemctl start mysqld. Service </ ol>
-
-
-
-
-
- 4, log in musql
-
-
[HTML] view plain copy
-
-
-
-
- mysql -u root </ ol>
-
-
-
-
-
-
-
- Be careful not to add minus p here
-
-
-
5, modify the password, mySQL5.7 use this syntax
[HTML] view plain copy
The
-
-
-
-
-
- use mysql; </ ol>
-
-
-
-
[HTML] view plain copy
-
-
-
-
-
-
- update mysql.user set authentication_string=password(‘123456′) where user=’root’; </ ol>
-
-
-
-
-
-
-
-
-
-
-
- 6, go back to the second step remove the plus
-
-
-
-
-
[HTML] view plain copy
-
-
-
-
-
-
-
- skip – grant – tables </ ol>
-
-
-
-
-
-
-
-
-
-
-
-
-
- Save and restart mysql
-
-
-
-
-
-
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
In fact, after installing mysql by default or in the log to generate a default password /var/log/mysqld.log
Login to mysql to reset the default password
[HTML] view plain copy
-
-
-
-
-
-
-
-
- set password = password (‘ you password “); </ ol>
-
-
-
-
-
-
-
If the password level does not match the default level requirement, it will be reported
[HTML] view plain copy
-
-
-
-
-
-
-
-
-
- Your password does not satisfy the current policy requirements
-
-
-
-
-
-
-
-
You need to change the level and the minimum default password number
[HTML] view plain copy
The
-
-
-
-
-
-
-
-
-
- set global validate_password_policy = 0; The set global validate_password_length = 4; </ ol>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- And then just set the password
-
-
-
-
-
-
-
-
# # # # # # # # # # # # # # # # # # #
Error 1130 on remote connection
[HTML] view plain copy
-
-
-
-
-
-
-
-
-
- mysql; The use of mysql; Mysql; Select ‘host’ from user where user=’root’; Mysql; Update user set host =’ %’ where user =’root’; Mysql; Flush privileges; Mysql; Select ‘host’ from user where user=’root’; </ ol>
-
-
-
-
-
-
-
-
Read More:
- MYSQL Error 1045 (28000): access denied for user ‘root’ @’localhost ‘(using password: Yes)
- [Solved] Access denied for user ‘root‘@‘localhost‘ (using password: YES)
- Mysqldump: Got error: 1045: Access denied for user ‘root‘@‘localhost‘
- [Solved] pymysql.err.OperationalError: (1045, “Access denied for user ‘root‘@‘192.168.118.44‘
- [Solved] there are special symbols in the initial password for installing MySQL in Hadoop, and an error is reported
- [Solved] Caused by: java.sql.SQLException: Access denied for user ‘root‘@‘hadoop102‘ (using password: YES)
- [Solved] ERROR 1396 (HY000): Operation ALTER USER failed for ‘root‘@‘localhost‘
- [Solved] Error 1044: Access denied for user ‘syz-remote‘@‘%‘ to database ‘webapp‘
- [Solved] CentOS installs MySQL and starts MySQL with error 2002 (HY000)
- [Solved] mysql 2003 remote access failed mysql8 configure remote access
- Mysql 8.0.13 Enabling remote access (ERROR 1064 (42000): You have an error in your SQL syntax; check the manual th)
- [Solved] MySQL: Syntax error or access violation: 1055 Expression #1 of SELECT list is not …
- MYSQL Enter password:ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost:3306‘
- How to Fix MySQL ERROR 1130 (HY000): Host ‘XXXX’ is not allowed to connect to this MySQL server
- MYSQL Use cmd to change root password error: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual tha
- [Solved] There is a problem with mysql8.0 without password in Navicat connection
- Remote connection to MySQL database error: is not allowed to connect to this MYSQL server solution
- [Solved] mysqldump: Error: ‘Access denied; you need (at least one of) the PROCESS privilege(s) for this opera
- Mysql5.7.18.1 Error 1054 (42S22): Unknown Column’password’ In’field List’ When Changing User Password
- Centos7 Initialize mysql Error: Could not open file ‘/usr/local/mysql/log/mysqld.log‘ for error logging: Per