Docker mysql8 modify password
Set skip password login
docker exec -it mysql /bin/sh
# Note: The configuration file for editing is docker.cnf
vi /etc/mysql/conf.d/docker.cnf
exit
Restart MySQL container
docker restart mysql
Restart MySQL container
The old version of the command is invalid:
update user set password = password (‘a123456 ‘), where user =’root'</ s>
correct:
UPDATE mysql.user SET authentication_string='' WHERE user='root' and host='localhost';
-- Change the password for use without expiration
ALTER USER 'root'@'%' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
flush privileges;
Error handling
ERROR 2059 (HY000): Authentication plugin ‘caching_ sha2_ password’ cannot be loaded: /usr/lib64/mysql/plugin/caching_ sha2_ password.so: cannot open shared object file: No such file or directory
Maybe the password is not set and will never expire. Maybe the database client version under Linux is too low. I tried to connect to mysql8 of docker in server B on server a, but the connection was successful by using DataGrid in windows.
Creating users and authorizations
create user 'nacos'@'%' identified by '123';
grant all on mid_nacos.* to 'nacos'@'localhost' ;
flush privileges;
Here, all the permissions of the table are granted, and all the items that can be authorized are explained and referenced https://www.cnblogs.com/yinzhengjie/p/10263692.html
Solve the error of operation create user failed for ‘user’ @ ‘%
It may be that the user already exists, you can delete and recreate it to
check whether the user exists: select user from user
delete: drop user 'user' @ '%
Solving com.mysql.cj.exceptions.unabletoconnectexception: public key retrieval is not allowed
Add & amp; after the connection information; allowPublicKeyRetrieval=true
Read More:
- [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 Enter password:ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost:3306‘
- [Solved] Navicat Connect MySQL error: Authentication plugin ‘caching_sha2_password‘ cannot be loaded
- MYSQL Error 1045 (28000): access denied for user ‘root’ @’localhost ‘(using password: Yes)
- [Solved] There is a problem with mysql8.0 without password in Navicat connection
- [Solved] Navicat connection error 1251 compatibility with docker MySQL
- Docker: How to Solve MYSQL8 & Navicat remote connection error
- mysql ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executin
- MySQL Change password failure prompt: ERROR 1064(42000):You have an error in your SQL syntax: check the corresponds to your M
- [Solved] there are special symbols in the initial password for installing MySQL in Hadoop, and an error is reported
- [Solved] docker mysql SQLSTATE[HY000] [2002] Connection refused
- Solve MySQL table can not query, modify, delete and other operations and appear stuck
- linux mysql ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
- MYSQL Use cmd to change root password error: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual tha
- [Solved] SQLSTATE[HY000] [2002] Connection refused to report an error when PHP connects to mysql in the docker container
- [Solved] Centons7 docker:mysql:5.7 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
- [How to Solve] Docker-mysql-cron-backup cannot perform tasks
- Mysql Flashback Warning: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe
- [Solved] ERROR 2002 (HY000): Can’t connect to local MySQL server through socket’/var/lib/mysql/mysql.sock’ (2)