sqlstudio可视化工具连接mariadb(或者mysql也可以)

 

MariaDB [(none)]> grant all on *.* to 'root'@'%' identified by '123456' ;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> show grants for 'root'@'%'
-> ;
+--------------------------------------------------------------------------------------------------------------+
| Grants for root@% |
+--------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY PASSWORD '*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9' |
+--------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

 

 应该选mysql数据库引擎

 ###################################################################################

 

 

 

 增删改查语句基本执行:基本练习

 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

添加数据源   设置------------------------------------数据配置

 

 测试连接:info正常

 

 给容器数据库进行提权:

 坑:

(已解决)Public Key Retrieval is not allowed异常

 

 

 


Public Key Retrieval is not allowed解决方法
Public Key Retrieval is not allowed解决方法
项目场景:
问题描述:
原因分析:
解决方案:
Public Key Retrieval is not allowed解决方法
项目场景:
项目搭建初期连接mysql
问题描述:
在appllication.yml中进行数据库配置 启动空项目是,报错 Public Key Retrieval is not allowed
#数据库配置
datasource:
type: com.alibaba.druid.pool.DruidDataSource
druid:
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.56.104:3306/company?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=false
jdbc:mysql://192.168.8.230:3306/company?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true

 

 登陆成功

 

posted @ 2023-04-24 21:49  往事已成昨天  阅读(132)  评论(0编辑  收藏  举报