0
点赞
收藏
分享

微信扫一扫

外部的Navicat连接docker中的mysql


登录mysql执行依次执行:

1.update user set authentication_string = password('11111') where user = 'root';

11111是一开始登录的时候设置的密码

 

2. alter user 'root'@'%' identified by '11111' password expire never;

 

 

3.alter user 'root'@'%' identified with mysql_native_password by '11111';

mysql> update user set authentication_string = password('11111') where user = 'root';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('11111') where user = 'root'' at line 1
mysql> update user set authentication_string='11111' where user = 'root'
-> ;
Query OK, 2 rows affected (0.08 sec)
Rows matched: 2 Changed: 2 Warnings: 0

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTIFIED BY 'root' WITH GRANT OPTION' at line 1
mysql> alter user 'root'@'%' identified by '11111' password expire never;
Query OK, 0 rows affected (0.07 sec)

mysql> alter user 'root'@'%' identified with mysql_native_password by '11111'
-> ;
Query OK, 0 rows affected (0.06 sec)

外部的Navicat连接docker中的mysql_navicate

希望对你有所帮助

 

举报

相关推荐

0 条评论