1、 Problem background
Log in to the installed MySQL in the Linux environment
2、 The screenshot of error reporting is as follows
3、 Solution
(1) Modify/etc/my.cnf and add skip grant tables in [mysqld] to skip the password verification process, as shown in the following figure
(2) Restart mysql. After restarting, you can enter MySQL
systemctl restart mysql
(3) Modify MySQL user name and password
mysql> use mysql;
mysql> Update user set password = password (“your new password”) where user = “root”
mysql> flush privileges;
mysql> quit
(4) Then remove the configuration just added in/etc/my.cnf and restart the MySQL service
Similar Posts:
- [Solved] Access denied for user ‘ODBC’@’localhost’ (using password: NO)
- MYSQL Login Error: mysqladmin: connect to server at ‘localhost’ failed
- [Solved] MYSQL Install and Login Error: Access denied for user ‘ODBC’@’localhost’ (using password: NO)
- Solve the problem of unknown column ‘password’ in ‘field list’ in MySQL
- Mysqldump backup problems got error: 1045, error 1045 (28000), got error: 1449
- mysql ERROR 1044 (42000): Access denied for user ‘
- [Solved] MYSQL ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘mys…
- MySQLAccess denied for user ‘root’@’localhost’ [How to Solve]
- [Solved] MYSQL ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘mysql’
- ERROR 1820 (HY000): Unknown error 1820 [How to Solve]