当前位置:网站首页>panic: Error 1045: Access denied for user ‘root‘@‘117.61.242.215‘ (using password: YES)
panic: Error 1045: Access denied for user ‘root‘@‘117.61.242.215‘ (using password: YES)
2022-07-26 13:13:00 【Code write comments】
Problem description :
1) Picture description :
perform start.sh Script ,goods-srv Sign up to Consul Failure .
2) A word description :
On the cloud server , Use Docker install MySQL 8, After a while , There is a password problem when accessing the database .====== Understand the beginning ======:
If you use mysql -uroot -pZXCzxc123 Can connect to , The password is ok .
Otherwise, the password is wrong . The error reported at this time is :
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Read and understand what the code prompt means .====== Understanding end ======.
Solution :
### Open your eyes and see clearly :1b3ddbed yes mysql Containers ID
[[email protected] target]# docker exec -it 1b3ddbed /bin/bash
[email protected]:/# mysql -uroot -pZXCzxc123
# ... Omit irrelevant code
mysql> use mysql;
# ... Omit irrelevant code
Database changed
mysql> update user set host = '%' where user ='root';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
[[email protected] target]# docker restart 1b3dd
1b3dd
[[email protected] target]# ./start.sh
starting goods_srv_main
start goods_srv_main success
[[email protected] target]#


thus :
perform start.sh Script ,goods-srv Sign up to Consul Failure —》 perform start.sh Script ,goods-srv Sign up to Consul success .
Problem solving .
边栏推荐
- 基于ASP.NET的某高校学院档案管理系统
- mqtt send receive
- Code examples explain the difference between [reentrant lock] and [non reentrant lock]?
- Chat system based on webrtc and websocket
- RMII, smii, gmii, rgmii interfaces of Ethernet Driver
- 基于BERT的情感分析模型
- Extra (5) - MySQL execution plan (51)
- 从其他文件触发pytest.main()注意事项
- StreamNative 团队文化:一家“透明”的公司
- [5g] what are Cu and Du in 5g?
猜你喜欢

3D modeling and rendering based on B é zier curve

Food safety | what food can be heated in a microwave oven? You should know these potential safety hazards

Food safety | these common foods are poisonous! Check your dining table quickly

HCIP第十一天比较(BGP的配置、发布)

How to face scientific and technological unemployment?

A college archives management system based on asp.net

Qualcomm once again "bet" on Zhongke Chuangda to challenge the full stack solution of intelligent driving software and hardware

1312_适用7z命令进行压缩与解压

二叉树的初阶笔记
2022 employment season! Adobe helps creative industry workers break through the shackles of skills and return to the source of ability
随机推荐
key&key_ Len & ref & filtered (4) - MySQL execution plan (50)
基于BERT的情感分析模型
Flutter prevents scientific counting and removes mantissa invalid 0
[typescript] typescript common types (Part 1)
B+树索引使用(8)排序使用及其注意事项(二十)
基于Locust框架进行文件上传下载性能测试
Kubernetes Flannel:HOST-GW模式
LCD notes (7) LCD driver framework_ Configure clock
Commonly used list Why does isempty() suddenly report null?
(int argc, char** argv) command line parameters in visual stdio (VS)
StreamNative 团队文化:一家“透明”的公司
Chat system based on webrtc and websocket
Elementary notes of binary tree
同站攻击(相关域攻击)论文阅读 Can I Take Your Subdomain?Exploring Same-Site Attacks in the Modern Web
HCIP第十一天比较(BGP的配置、发布)
Outline design specification
Streamnational team culture: a "transparent" company
Code examples explain the difference between [reentrant lock] and [non reentrant lock]?
pomerium
Why do you want to make "secret comments"?