您现在的位置是:网站首页> 编程资料编程资料
MySql5.x升级MySql8.x的方法步骤_Mysql_
2023-05-27
478人已围观
简介 MySql5.x升级MySql8.x的方法步骤_Mysql_
Mysql5.x与Mysql8.0.X的几点不同
application.properties的不同
被注释掉的对应 8.0.x 版本的内容.
spring.datasource.driver-class-name=com.mysql.jdbc.Driver //spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.username=root//你的用户名.默认root spring.datasource.password=123456//你的密码.默认root spring.datasource.url=jdbc:mysql://127.0.0.1:3306/sell?characterEncoding=utf-8&useSSL=false //spring.datasource.url=jdbc:mysql://127.0.0.1:3306/sell?useUnicode=true&characterEncoding=UTF8&useSSL=false&serverTimezone=UTC spring.jpa.show-sql=true server.context-path=/sell //server.servlet.context-path=/sell
MySql5.x升级MySql8.x非常简单,一般来说只需要操作两个步骤即可
1. 替换新的jar包
mysql mysql-connector-java 8.0.18
2. 替换新驱动类
com.mysql.cj.jdbc.Driver
3. 替换新url连接,需要指定时区
# 设定时间为东八区 serverTimezone=GMT%2B8 # 完整url String url="jdbc:mysql://"+dbHost+":"+dbPort+"/"+dbName+"?" + "serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8" + "&port="+dbPort+"&autoReconnect=true";
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。
您可能感兴趣的文章:
相关内容
- mysql存储过程之返回多个值的方法示例_Mysql_
- MySql Installer 8.0.18可视化安装教程图文详解_Mysql_
- mysql存储过程之创建(CREATE PROCEDURE)和调用(CALL)及变量创建(DECLARE)和赋值(SET)操作方法_Mysql_
- mysql存储过程之引发存储过程中的错误条件(SIGNAL和RESIGNAL语句)实例分析_Mysql_
- Linux下安装MySQL8.0.11的教程_Mysql_
- mysql 8.0.18各版本安装及安装中出现的问题(精华总结)_Mysql_
- CentOS7下 MySQL定时自动备份的实现方法_Mysql_
- Windows下mysql-5.7.28下载、安装、配置教程图文详解_Mysql_
- Linux下修改MySQL数据库数据文件路径的步骤_Mysql_
- mysql 8.0.18 mgr 搭建及其切换功能_Mysql_
