## 准备工作
1. 安装 PHPStudy
2. 软件管理 -> mysql 8.0
3. 启动 mysql 8.0
4. 链接数据库
mysql -h localhost -u 用户名 -p
5. 创建数据库(一个项目创建一个数据)
```sql
create database imooc;
use imooc;
```
6. 创建数据表
```sql
create table course(
id int unsigned not null auto_increment primary key,
course_name varchar(255) not null comment "课程名字",
course_href varchar(255) not null comment "课程地址",
course_difficulty varchar(255) not null comment "课程难度",
course_student_num int unsigned not null comment "课程学生数量",
course_img_href varchar(255) not null comment "课程图片地址"
)engine=InnoDB;
```
!!!!!!要有逗号
##链接HeidiSQL
输入密码:Gdyzy@123
##运行代码
检查
##1.如若出错,检查用户名,密码
##2.如若出错,检查数据库
print(sql) exit()