打开DataGrip创建一个MySQL数据库

DataGrip创建MySQL数据库与使用

打开数据库的配置

会提示安装驱动,数据库的版本需要与驱动版本一致.

自己在官网下载MySQL驱动.

DataGrip创建MySQL数据库与使用
DataGrip创建MySQL数据库与使用

若不一致,需要下载驱动 http://central.maven.org/maven2/mysql/mysql-connector-java/

Test Connection

DataGrip创建MySQL数据库与使用

若出现问题,查看问题报错,可能是

java.sql.SQLException: The server time zone value ‘Öйú±ê׼ʱ¼ä’ is
unrecognized or represents more than one time zone. You must configure
either the server or JDBC driver (via the serverTimezone configuration
property) to use a more specifc time zone value if you want to utilize
time zone support.

解决方法:

设置整个数据库的时区,可以采用sql来完成:

mysql > show variables like ‘%time_zone%’;

mysql > set global time_zone=’+8:00’;

简单使用

DataGrip创建MySQL数据库与使用

创建一个students的表名,插入一些数据并进行查询。

相关文章:

  • 2021-07-29
  • 2021-05-27
  • 2021-09-02
  • 2022-12-23
  • 2021-07-10
  • 2022-01-07
猜你喜欢
  • 2022-12-23
  • 2021-11-09
  • 2022-12-23
  • 2022-12-23
  • 2021-09-29
  • 2021-11-11
  • 2022-03-10
相关资源
相似解决方案