MySQL 官方示例数据库安装
来源:互联网 发布:js修改对象的属性值 编辑:程序博客网 时间:2024/06/05 11:14
虽然MySQL安装包中不像SQL Server和Oracle那样提供示例数据库,但官方也提供示例数据库以供学习使用。
官方示例数据库
下载地址
http://dev.mysql.com/doc/index-other.html
Documenation - Other Docs - Example Databases 示例库和文档放到了一起,在employee data 下选择 Download 跳转到下载界面。
导入employees数据库
上传文件到任意路径下
[root@dbm01 home1]# lsemployees_db-full-1.0.6.tar.bz2 mysql mysql-5.6.21.tar.gz
[root@dbm01 home1]# tar -xjf employees_db-full-1.0.6.tar.bz2
解压后,可以看见有如下文件
[root@dbm01 employees_db]# lltotal 164680-rw-r--r--. 1 501 games 752 Mar 30 2009 Changelog-rw-r--r--. 1 501 games 6460 Oct 9 2008 employees_partitioned2.sql-rw-r--r--. 1 501 games 7624 Feb 6 2009 employees_partitioned3.sql-rw-r--r--. 1 501 games 5660 Feb 6 2009 employees_partitioned.sql-rw-r--r--. 1 501 games 3861 Nov 28 2008 employees.sql-rw-r--r--. 1 501 games 241 Jul 30 2008 load_departments.dump-rw-r--r--. 1 501 games 13828291 Mar 30 2009 load_dept_emp.dump-rw-r--r--. 1 501 games 1043 Jul 30 2008 load_dept_manager.dump-rw-r--r--. 1 501 games 17422825 Jul 30 2008 load_employees.dump-rw-r--r--. 1 501 games 115848997 Jul 30 2008 load_salaries.dump-rw-r--r--. 1 501 games 21265449 Jul 30 2008 load_titles.dump-rw-r--r--. 1 501 games 3889 Mar 30 2009 objects.sql-rw-r--r--. 1 501 games 2211 Jul 30 2008 README-rw-r--r--. 1 501 games 4455 Mar 30 2009 test_employees_md5.sql-rw-r--r--. 1 501 games 4450 Mar 30 2009 test_employees_sha.sql
导入文件employees.sql (需要制定用户名和密码,不然会报错+_+)
[root@dbm01 employees_db]# mysql -t < employees.sqlERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@dbm01 employees_db]# mysql -t < employees.sql -uroot -proot123Warning: Using a password on the command line interface can be insecure.+-----------------------------+| 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 |+------------------+
使用test_employees_sha.sql文件校验数据
[root@dbm01 employees_db]# mysql -t < test_employees_sha.sql -uroot -proot123Warning: Using a password on the command line interface can be insecure.+----------------------+| 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 |+--------------+---------------+-----------+
使用test_employees_md5.sql文件校验数据
[root@dbm01 employees_db]# mysql -t < test_employees_md5.sql -uroot -proot123Warning: Using a password on the command line interface can be insecure.+----------------------+| INFO |+----------------------+| TESTING INSTALLATION |+----------------------++--------------+------------------+----------------------------------+| table_name | expected_records | expected_crc |+--------------+------------------+----------------------------------+| employees | 300024 | 4ec56ab5ba37218d187cf6ab09ce1aa1 || departments | 9 | d1af5e170d2d1591d776d5638d71fc5f || dept_manager | 24 | 8720e2f0853ac9096b689c14664f847e || dept_emp | 331603 | ccf6fe516f990bdaa49713fc478701b7 || titles | 443308 | bfa016c472df68e70a03facafa1bc0a8 || salaries | 2844047 | fd220654e95aea1b169624ffe3fca934 |+--------------+------------------+----------------------------------++--------------+------------------+----------------------------------+| table_name | found_records | found_crc |+--------------+------------------+----------------------------------+| employees | 300024 | 4ec56ab5ba37218d187cf6ab09ce1aa1 || departments | 9 | d1af5e170d2d1591d776d5638d71fc5f || dept_manager | 24 | 8720e2f0853ac9096b689c14664f847e || dept_emp | 331603 | ccf6fe516f990bdaa49713fc478701b7 || titles | 443308 | bfa016c472df68e70a03facafa1bc0a8 || salaries | 2844047 | fd220654e95aea1b169624ffe3fca934 |+--------------+------------------+----------------------------------++--------------+---------------+-----------+| 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 |+--------------+---------------+-----------+
employee组织结构图
1 0
- MySQL 官方示例数据库安装
- MYSQL安装示例数据库
- 【mysql学习系列】Mysql数据库导入官方示例数据库
- 安装MySQL示例数据库sakila
- 安装mysql示例数据库sakila
- 安装Mysql官方的sakila数据库
- 【SUBSTRING_INDEX】MySQL官方示例
- Windows安装Mysql和示例数据库
- mysql导入官方示例employees
- 使用YUM安装官方发布的MySQL数据库
- mysql示例employees数据库
- 连接mysql数据库示例
- MySQL示例employees数据库
- Mysql导入官方示例employees问题解决记录
- Mysql导入官方示例employees问题解决记录
- Mysql导入官方示例employees问题解决记录
- Mysql导入官方示例employees问题解决记录
- 安装AdventureWorks2008R2示例数据库
- stdafx.h
- try,catch,finall,return的执行顺序
- 游戏地图,精灵移动处理,粒子系统,声音引擎,地图移动,游戏暂停
- iOS-CS193p-01-简单的抽牌应用
- iOS开发之远程推送
- MySQL 官方示例数据库安装
- Value Object模式
- Activity.setContentView()源码分析
- Java中异常处理机制
- 【OpenCV入门教程之一】 安装OpenCV:OpenCV 3.0、OpenCV 2.4.8、OpenCV 2.4.9 +VS 开发环境配置
- Jquery和Ajax的使用参考手册
- sql之left join、right join、inner join的区别
- SharedPerferences的简单使用
- Java RMI 远程方法调用