mysql练习用的数据集下载

https://launchpad.net/test-db/employees-db-1/1.0.6

中下载

employees_db-full-1.0.6.tar.bz2

cd employees_db-full-1.0.6

 

employees.sql中的

set storage_engine = InnoDB;改为

set default_storage_engine = InnoDB;

 

select CONCAT('storage engine: ', @@storage_engine) as INFO;改为

select CONCAT('default_storage_engine: ', @@default_storage_engine) as INFO;

目前是第38行和第44行需要修改

mysql练习用的数据集下载_第1张图片

然后

mysql -uroot -p -t < employees.sql

即可

导入过程如下:

(python2.7) appleyuchi@ubuntu:~/employees_db$ mysql -uroot -p -t < employees.sqlEnter password: 
+-----------------------------+
| INFO                        |
+-----------------------------+
| CREATING DATABASE STRUCTURE |
+-----------------------------+
+--------------------------------+
| INFO                           |
+--------------------------------+
| default_storage_engine: InnoDB |
+--------------------------------+
+---------------------+
| INFO                |
+---------------------+
| LOADING departments |
+---------------------+
+-------------------+
| INFO              |
+-------------------+
| LOADING employees |
+-------------------+
+------------------+
| INFO             |
+------------------+
| LOADING dept_emp |
+------------------+
+----------------------+
| INFO                 |
+----------------------+
| LOADING dept_manager |
+----------------------+
+----------------+
| INFO           |
+----------------+
| LOADING titles |
+----------------+
+------------------+
| INFO             |
+------------------+
| LOADING salaries |
+------------------+


导入时间很慢,比较磨叽,慢慢等吧。

你可能感兴趣的:(MySQL数据库)