1 创建数据库
create database test2;
2 创建用户
create user test2@localhost identified with mysql_native_password by '';
3 分配权限
grant all privileges on test2.* to test2@localhost;
4 创建数据表
create table `people` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) DEFAULT NULL,
`age` smallint(6) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8