DBeaver连接MySQL驱动下载失败解决办法
1. 下载MySQL驱动:
2. 解压安装包,并添加到DBeaver驱动里头:
解压路径:(我和Mysql放在一块了)
3. 出现The server time zone value ‘�й���ʱ��’ is unrecognized:
因为这个插件时走国外的时区,所以要在Mysql时间设置一下增加8小时:
第一种解决方法:
cmd命令中进入mysql输入如下命令即可:
set global time_zone = '+8:00'; ##修改mysql全局时区为北京时间,即我们所在的东8区
set time_zone = '+8:00'; ##修改当前会话时区
flush privileges; ##立即生效
! 此方法可以解决表面问题,但是一旦关机或重启mysql服务后下一次又需要重新去设置 !
第二种解决方法:
在MySQL的配置文件my.ini中加入
default-time_zone = '+8:00'
my.ini文件:
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[client]
default-character-set = utf8mb4
[mysql]
default-character-set = utf8mb4
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_bin
init_connect='SET NAMES utf8mb4'
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
basedir = D:\Work\MySQL\mysql-8.0.22-winx64
datadir = D:\Work\MySQL\mysql-8.0.22-winx64\data
port = 3306
# server_id = .....
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
join_buffer_size = 128M
sort_buffer_size = 16M
read_rnd_buffer_size = 16M
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
default-time_zone = '+8:00'
如果没有my.ini配置文件,我是删掉电脑的MySQL重新配置的:
删除MySQL数据库:https://blog.csdn.net/weixin_46836563/article/details/112125995
安装MySQL80
https://blog.csdn.net/weixin_46836563/article/details/112124429
设置MySQL环境变量:
https://blog.csdn.net/weixin_46836563/article/details/112125396