如何下载mysql示例数据库employees

发布网友 发布时间:2022-04-23 12:57

我来回答

3个回答

懂视网 时间:2022-05-02 08:52

数据库系统:MySQL 5.5.52

任务:安装employee示例数据库

操作步骤:

[root@sky96 ~]# wget https://launchpadlibrarian.net/24493586/employees_db-full-1.0.6.tar.bz2

[root@sky96 ~]#tar jxf employees_db-full-1.0.6.tar.bz2

[root@sky96 ~]# cd employees_db

[root@sky96 employees_db]# mysql -uroot  -p  -t <employees.sql    #导入数据库

Enter password: 

+-----------------------------+

| INFO                        |

+-----------------------------+

| CREATING DATABASE STRUCTURE |

+-----------------------------+

+------------------------+

| INFO                   |

+------------------------+

| storage engine: InnoDB |

+------------------------+

+---------------------+

| INFO                |

+---------------------+

| LOADING departments |

+---------------------+

+-------------------+

| INFO              |

+-------------------+

| LOADING employees |

+-------------------+

+------------------+

| INFO             |

+------------------+

| LOADING dept_emp |

+------------------+

+----------------------+

| INFO                 |

+----------------------+

| LOADING dept_manager |

+----------------------+

+----------------+

| INFO           |

+----------------+

| LOADING titles |

+----------------+

+------------------+

| INFO             |

+------------------+

| LOADING salaries |

+------------------+

[root@sky96 employees_db]# time mysql -uroot  -p  -t < test_employees_sha.sql   #验证数据库

Enter password: 

+----------------------+

| INFO                 |

+----------------------+

| TESTING INSTALLATION |

+----------------------+

+--------------+------------------+------------------------------------------+

| table_name   | expected_records | expected_crc                             |

+--------------+------------------+------------------------------------------+

| employees    |           300024 | 4d4aa6914d8fd41db7e45c2168e7dcb9697359 |

| departments  |                9 | 4b315afa0e35ca69df7b958345bcb3d2b7 |

| dept_manager |               24 | 9687a7d6f93ca8847388a42a6d8d93982a841c6c |

| dept_emp     |           331603 | d95ab9fe07df0865f592574b3b33b9c741d9fd1b |

| titles       |           443308 | d12d5f746b88f07e69b9e36675b6067abb01b60e |

| salaries     |          2844047 | b5a1785c27d75e33a4173aaa22ccf41ebd7d4a9f |

+--------------+------------------+------------------------------------------+

+--------------+------------------+------------------------------------------+

| table_name   | found_records    | found_crc                                |

+--------------+------------------+------------------------------------------+

| employees    |           300024 | 4d4aa6914d8fd41db7e45c2168e7dcb9697359 |

| departments  |                9 | 4b315afa0e35ca69df7b958345bcb3d2b7 |

| dept_manager |               24 | 9687a7d6f93ca8847388a42a6d8d93982a841c6c |

| dept_emp     |           331603 | d95ab9fe07df0865f592574b3b33b9c741d9fd1b |

| titles       |           443308 | d12d5f746b88f07e69b9e36675b6067abb01b60e |

| salaries     |          2844047 | b5a1785c27d75e33a4173aaa22ccf41ebd7d4a9f |

+--------------+------------------+------------------------------------------+

+--------------+---------------+-----------+

| table_name   | records_match | crc_match |

+--------------+---------------+-----------+

| employees    | OK            | ok        |

| departments  | OK            | ok        |

| dept_manager | OK            | ok        |

| dept_emp     | OK            | ok        |

| titles       | OK            | ok        |

| salaries     | OK            | ok        |

+--------------+---------------+-----------+

real    0m19.958s

user    0m0.005s

sys     0m0.009s


本文出自 “sky90” 博客,请务必保留此出处http://sky96.blog.51cto.com/2330653/19538

MySQL安装示例employee数据库

标签:mysql employee

热心网友 时间:2022-05-02 06:00

下载地址如下:launchpad.net/test-db/employees-db-1/1.0.6

下载后解压:

tar -xjf $HOME/Downloads/employees_db-full-1.0.4.tar.bz2  
//解压缩,进入目录  
cd employees_db/  
//导入数据库root为用户名  
mysql -t -u root -p < employees.sql

其中,数据表关系如下:

热心网友 时间:2022-05-02 07:18

有弹出框,我已成功下载

追问我这儿不知道什么原因,下载不了呢?能否将压缩包发到偶的邮箱 xingzhongliang@163.com,不胜感激

追答发过去了

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com