CREATE DATABASE `mybatis`;
USE `mybatis`;
CREATE TABLE `user` (
`id` INT(20) NOT NULL PRIMARY KEY,
`name` VARCHAR(20) DEFAULT NULL,
`pwd` VARCHAR(30) DEFAULT NULL
)ENGINE=INNODB DEFAULT CHARSET=utf8;
INSERT INTO `user` (`id`, `name`, `pwd`) VALUES
(1, ‘王五‘, ‘123456‘),
(2, ‘张三‘, ‘123456‘),
(3, ‘李四‘, ‘1234‘)
SELECT * FROM `user`;
SET GLOBAL time_zone = ‘+8:00‘;
SET time_zone = ‘+8:00‘;
FLUSH PRIVILEGES;
SHOW VARIABLES LIKE ‘%time_zone%‘;
mysql相关问题
- 无法使用命令
net start mysql
开启mysql 。
cd C:\Environment\mysql-5.7.19
mysqld --console - mysqld –install 安装mysql, 已经存在mysql
以下命令移除存在mysql:
mysqld.exe --remove