Home >Database >Mysql Tutorial >How to integrate idea with mysql
# Recommended: "Idea method to integrate mysql: first open the database tool window; then click the add button " " in the upper left corner of the Database tool window and select the database type MySQL; finally download the relevant files and fill in the host name, database name, Just a username and password.
mysql video tutorial》
1. IntelliJ IDEA integrates MySQL database button to test whether the database connection is normal. The test may report an error as follows:
Please continue reading below for the solution
win R, bring up the Dos window, start mysql
# 查看时区show variables like '%time_zone%';# 设置时区set global time_zone = '+8:00';
Set the time zone successfully, Check the time zone again, the display is as follows
Note: mysql needs to be restarted to view
Test Connection button to test whether the database connection is normal
serverTimezone to:
Asia/Shanghai or
Hongkong or
Asia/Hongkong
jd.sqlTest
DROP database IF EXISTS `jd`;create database jd;use jd;DROP database IF EXISTS `jd_item`;CREATE TABLE `jd_item` ( `id` bigint(10) NOT NULL AUTO_INCREMENT COMMENT '主键id', `spu` bigint(15) DEFAULT NULL COMMENT '商品集合id', `sku` bigint(15) DEFAULT NULL COMMENT '商品最小品类单元id', `title` varchar(100) DEFAULT NULL COMMENT '商品标题', `price` bigint(10) DEFAULT NULL COMMENT '商品价格', `pic` varchar(200) DEFAULT NULL COMMENT '商品图片', `url` varchar(200) DEFAULT NULL COMMENT '商品详情地址', `created` datetime DEFAULT NULL COMMENT '创建时间', `updated` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`), KEY `sku` (`sku`) USING BTREE) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='京东商品表';
jd and the data table
jd_item
The above is the detailed content of How to integrate idea with mysql. For more information, please follow other related articles on the PHP Chinese website!