一要给命令后面加上分号。
Asia/Shanghai
# 查看当前数据库列表show databases;# 打开指定的库user [库名];# 查看当前库的所有表show tables;# 查看其他库的所有表show tables from [库名];# 创建一个表create table [表名] ([列名01] [列类型01],[列名02] [列类型03]);# 查看表结构desc [表名];# 查看MySql版本## 1.用户登录后,执行查询语句。select version();## 2.没有登录mysql --version## 3.或者mysql --V# 查看时区show variables like'%time_zone';# 显示 SYSTEM 就是没有设置时区# 设置时区set global time_zone = '+8:00';
链接命令:
jdbc:mysql://localhost:3306/db2019?characterEncoding=UTF-8&useUnicode=true&useSSL=false&serverTimezone=GMT%2B8jdbc:mysql://localhost:3306/sc2020?characterEncoding=UTF-8&useUnicode=true&useSSL=false&serverTimezone=Asia/Shanghai&tinyInt1isBit=false&allowPublicKeyRetrieval=true
