Server operating system: CentOS release 6.8 (Final)
Database system: MySQL 5.5.52
Task: Install the Employee sample database
Operation Steps:
[Email protected] ~]# wget https://launchpadlibrarian.net/24493586/employees_db-full-1.0.6.tar.bz2
[[Email protected] ~] #tar jxf employees_db-full-1.0.6.tar.bz2
[Email protected] ~]# CD employees_db
[email protected] 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 |
+------------------+
[[email protected] employees_db]# time Mysql-uroot-p-T < test_employees_sha.sql #验证数据库
Enter Password:
+----------------------+
| INFO |
+----------------------+
| Testing Installation |
+----------------------+
+--------------+------------------+------------------------------------------+
| table_name | Expected_records | EXPECTED_CRC |
+--------------+------------------+------------------------------------------+
| Employees | 300024 | 4d4aa689914d8fd41db7e45c2168e7dcb9697359 |
| Departments | 9 | 4b315afa0e35ca6649df897b958345bcb3d2b764 |
| Dept_manager | 24 | 9687a7d6f93ca8847388a42a6d8d93982a841c6c |
| Dept_emp | 331603 | d95ab9fe07df0865f592574b3b33b9c741d9fd1b |
| Titles | 443308 | d12d5f746b88f07e69b9e36675b6067abb01b60e |
| Salaries | 2844047 | b5a1785c27d75e33a4173aaa22ccf41ebd7d4a9f |
+--------------+------------------+------------------------------------------+
+--------------+------------------+------------------------------------------+
| table_name | Found_records | FOUND_CRC |
+--------------+------------------+------------------------------------------+
| Employees | 300024 | 4d4aa689914d8fd41db7e45c2168e7dcb9697359 |
| Departments | 9 | 4b315afa0e35ca6649df897b958345bcb3d2b764 |
| 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
This article is from the "sky9890" blog, make sure to keep this source http://sky9896.blog.51cto.com/2330653/1953898
MySQL Installation sample Employee database