Today, I installed a MySQL database in the server because there was a ‘)’ in the initial password assigned. I always reported an error when entering the password. I tried many changes on the Internet. It’s useless to wrap anything in quotation marks. Next, let’s talk about my solution:
Step 1:
vi /etc/my.cnf
After opening, add a sentence: skip grant tables
The function is equivalent to that no password is required for login
Step 2:
Restart MySQL
systemctl restart mysqld
Step 3:
Direct Logins
mysql -uroot -p
Step 4:
// goto database
use mysql
// refresh the data
flush privileges;
Step 5:
Change password
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'PASSWORD';
Then, delete the just secret free statement and restart MySQL
Login
mysql -uroot -p[NEW PASSWORD]
Read More:
- After installing mysql5.7 on centos7, an error 1045 (28000) is reported: access denied for user ‘root’ @’localhost ‘(using PAS)
- [Solved] There is a problem with mysql8.0 without password in Navicat connection
- MySQL Change password failure prompt: ERROR 1064(42000):You have an error in your SQL syntax: check the corresponds to your M
- MYSQL Use cmd to change root password error: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual tha
- [Solved] Navicat Connect MySQL error: Authentication plugin ‘caching_sha2_password‘ cannot be loaded
- Docker mysql8 modify password
- [Solved]Error 1054 (42s22): unknown column ‘password’ in ‘field list’ how to modify the password
- Mysql5.7.18.1 Error 1054 (42S22): Unknown Column’password’ In’field List’ When Changing User Password
- Mysql 8.0.13 Enabling remote access (ERROR 1064 (42000): You have an error in your SQL syntax; check the manual th)
- MYSQL Error 1045 (28000): access denied for user ‘root’ @’localhost ‘(using password: Yes)
- mysql ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executin
- [Solved Perfectly] MySQL ERROR 1064 (42000): You have an error in your SQL syntax;
- MySQL Error: [ERROR] [FATAL] InnoDB: Table flags are 0 in the data dictionary but the flags in file
- Remote connection to MySQL database error: is not allowed to connect to this MYSQL server solution
- ERROR 1054(42S22) Unknown column ‘password’ in ‘field list’ (Fixed)
- [Solved] ERROR 1054 (42S22): Unknown column ‘password‘ in ‘field list‘
- [Solved] Caused by: java.sql.SQLException: Access denied for user ‘root‘@‘hadoop102‘ (using password: YES)
- 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
- [Solved] Sqlyog always reports an error when creating a new connection.