解决win10下MySQL 8.0登录Access denied for user 'root'@'localhost' (using password: YES)的问题

解决办法:重新设置密码

mysql 8.0以下:

update mysql.user set authentication_string="123456" where user="root";

mysql 8.0以上:

alter user 'root'@'localhost'IDENTIFIED BY '123456';

同时mysql8.0需要更换pom和驱动。

.pom文件换mysql-connect-jar

mysql

mysql-connector-java

8.0.11

datasource:

driverClassName: com.mysql.cj.jdbc.driver

url: jdbc:mysql://localhost:3306/mcms?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&allowPublicKeyRetrieval=true

username: root

password: tree0907pw

filters: wall,mergeStat

type: com.alibaba.druid.pool.DruidDataSource

解决The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone问题

解决办法:

根据提示需要在配置数据库的连接信息中,在MySQL的URL后面加上“?serverTimezone=UTC” ,如下所示:

spring.datasource.url=jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC

MySQL 8.0 Public Key Retrieval is not allowed 错误的解决方法

在使用 MySQL 8.0 提示 com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Public Key Retrieval is not allowed

最简单的解决方法是在连接后面添加 allowPublicKeyRetrieval=true

文档中(https://mysql-net.github.io/MySqlConnector/connection-options/)给出的解释是:

如果用户使用了 sha256_password 认证,密码在传输过程中必须使用 TLS 协议保护,但是如果 RSA 公钥不可用,可以使用服务器提供的公钥;可以在连接中通过 ServerRSAPublicKeyFile 指定服务器的 RSA 公钥,或者AllowPublicKeyRetrieval=True参数以允许客户端从服务器获取公钥;但是需要注意的是 AllowPublicKeyRetrieval=True可能会导致恶意的代理通过中间人攻击(MITM)获取到明文密码,所以默认是关闭的,必须显式开启

mysql could not create connection_mysql8.0 Could not create connection to database server.解决办法...相关推荐

  1. MySql :Could not create connection to database server.

    错误: Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:Error que ...

  2. nacos连接mysql出现:Could not create connection to database server. Attempted reconnect 3 times. Giving u

    nacos连接mysql出错 今天在学习nacos的时候,在从nacos内嵌数据derby切换到mysql的时候,出现一个错误,特意记一下. org.springframework.jdbc.Cann ...

  3. could not create connection to database server.] with root cause

    场景 SpringBoot项目运行后提示: 详细提示如下: ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: ...

  4. JAVA——[MySQLNonTransientConnectionException:Could not create connection to database server.]解决方案

    问题描述 com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connecti ...

  5. JAVA.SQL.SQLNONTRANSIENTCONNECTIONEXCEPTION: COULD NOT CREATE CONNECTION TO DATABASE SERVER. ATTEMPT

    错误信息 java.sql.SQLNonTransientConnectionException: Could not create connection to database server. At ...

  6. [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.解决办法

    pycharm中database连接MySQL数据库时出现如下提示: [08001] Could not create connection to database server. Attempted ...

  7. 数据库连接失败: Could not create connection to database server. Attempted reconnect 3 times. Giving up.

    数据库连接失败信息摘要: ERROR-com.alibaba.druid.pool.DruidDataSource init:927: init datasource error,url: jdbc: ...

  8. [08001] Could not create connection to database server. Attempted reconnect 3 times.

    现象描述: 在JetBrains的系列产品中,database连接MySQL数据库时,如Idea.DataGrip.GoLand.Pycharm 等等,连接MySQL数据库时会出现如下提示: 连接失败 ...

  9. 08001] Could not create connection to database server. Attempted reconnect 3 times.

    现象描述: 在JetBrains的系列产品中,database连接MySQL数据库时,如Idea.DataGrip.GoLand.Pycharm 等等,连接MySQL数据库时会出现如下提示: 连接失败 ...

最新文章

  1. armv8/armv9的简介-学习这一篇就够了
  2. SQLserver多条件查询
  3. Neo4j【付诸实践 01】SpringBoot集成报错org.neo4j.driver.exceptions.ClientException:服务器不支持此驱动程序支持的任何协议版本(解决+源代码)
  4. linux on zfs,在zfsonlinux中增长zpool
  5. Linux 命令之 unzip -- 解压缩文件
  6. 2019年你准备学C/C++,这些硬知识你应该知道!
  7. ERROR: Could not open CONNECT tunnel
  8. Android开发技术周报 Issue#102
  9. 阿里云何云飞:如何利用云原生技术在AIoT领域成功落地 | 云栖大会
  10. 软件工程期末考试题库(超全)
  11. 春运火车票抢票浏览器强力推荐,秒抢车票到手
  12. IOS学习笔记-加速度传感器(重力感应)-UIAccelerometer
  13. 《简约至上:交互式设计四策略》读书笔记
  14. Python类:super
  15. 深圳内推 | 香港中文大学(深圳)路广利老师招聘NLP方向研究助理
  16. 大疆无人机安卓Mobile Sdk开发(四)读取飞机的图片和视频并下载
  17. 什么样的程序员才是牛逼的程序员?
  18. java psyounggen_Java 虚拟机
  19. 【Linux系列-2】iostat命令详解
  20. Typora+PicGo图床配置以及PicGo上传失败的解决办法

热门文章

  1. 服务管理--systemctl命令
  2. 编程中检查IIS7组件的安装情况
  3. UML 2.0(装载)
  4. dll文件32位64位检测工具以及Windows文件夹SysWow64的坑
  5. 黄聪: bootstrap 多模态框实现
  6. java基础专栏—CommonApi
  7. Linux新手要了解的十个知识点
  8. Java程序员面试中的多线程问题1
  9. OWA修改密码注意事项
  10. Mac OS X Git安装教程