mysql官方有个自带的测试数据库,叫employees,超过三十万的数据,含六个表格。在MySQL官网上提供的GitHub链接可以下载
官网地址:https://dev.mysql.com/doc/employee/en/
github地址:https://github.com/datacharmer/test_db
官方安装教程:https://dev.mysql.com/doc/employee/en/employees-installation.html
1、 将下载的到包上传至服务器
2、解压
unzip test_db-master.zip -C 指定解压的目录
3、进入到解压的目录test_db-master
cd test_db-master/
4、导入数据
# 通过root进行导入、在下面的代码后键入当前数据库的密码即可导入
mysql -t <employees.sql -u root -p