zoukankan      html  css  js  c++  java
  • 导入 Mysql 示例数据库 employees

    Mysql也有跟Oracle的scott与employees相似的数据库,这样就免除了每次都要自己建表并插入数据了。
    
    Mysql提供的供练习使用的数据库employees,下面地址:https://launchpad.net/test-db/employees-db-1/1.0.6
    下载其中的employees_db-full-1.0.6.tar.bz2,之后按下列步骤解压缩,并安装。
    
    
    1、解压文件
    [root@rac1 opt]# tar -xjf employees_db-full-1.0.6.tar.bz2 
    [root@rac1 opt]# cd employees_db
    [root@rac1 employees_db]# ls -al
    总计 164724
    drwxr-xr-x 2 root root       4096 09-10 19:33 .
    drwxr-xr-x 4 root root       4096 09-10 19:33 ..
    -rw-r--r-- 1  501 games       752 2009-03-30 Changelog
    -rw-r--r-- 1  501 games       161 2008-10-09 ._employees_partitioned2.sql
    -rw-r--r-- 1  501 games      6460 2008-10-09 employees_partitioned2.sql
    -rw-r--r-- 1  501 games      7624 2009-02-06 employees_partitioned3.sql
    -rw-r--r-- 1  501 games      5660 2009-02-06 employees_partitioned.sql
    -rw-r--r-- 1  501 games       161 2008-11-28 ._employees.sql
    -rw-r--r-- 1  501 games      3861 2008-11-28 employees.sql
    -rw-r--r-- 1  501 games       161 2008-07-30 ._load_departments.dump
    -rw-r--r-- 1  501 games       241 2008-07-30 load_departments.dump
    -rw-r--r-- 1  501 games  13828291 2009-03-30 load_dept_emp.dump
    -rw-r--r-- 1  501 games       161 2008-07-30 ._load_dept_manager.dump
    -rw-r--r-- 1  501 games      1043 2008-07-30 load_dept_manager.dump
    -rw-r--r-- 1  501 games       161 2008-07-30 ._load_employees.dump
    -rw-r--r-- 1  501 games  17422825 2008-07-30 load_employees.dump
    -rw-r--r-- 1  501 games       161 2008-07-30 ._load_salaries.dump
    -rw-r--r-- 1  501 games 115848997 2008-07-30 load_salaries.dump
    -rw-r--r-- 1  501 games       161 2008-07-30 ._load_titles.dump
    -rw-r--r-- 1  501 games  21265449 2008-07-30 load_titles.dump
    -rw-r--r-- 1  501 games      3889 2009-03-30 objects.sql
    -rw-r--r-- 1  501 games      2211 2008-07-30 README
    -rw-r--r-- 1  501 games       161 2008-07-30 ._README
    -rw-r--r-- 1  501 games      4455 2009-03-30 test_employees_md5.sql
    -rw-r--r-- 1  501 games      4450 2009-03-30 test_employees_sha.sql
    
    
    2、安装过程
    [root@rac1 employees_db]# mysql -u root -p < 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
    
    
    3、检查安装的表有哪些
    mysql> use employees;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    Database changed
    mysql> show tables;
    +---------------------+
    | Tables_in_employees |
    +---------------------+
    | departments         |
    | dept_emp            |
    | dept_manager        |
    | employees           |
    | salaries            |
    | titles              |
    +---------------------+
    6 rows in set (0.04 sec)
    
    
  • 相关阅读:
    再不努力提高效率,小姐姐都被人追走了:K8S一键部署了解一下?
    Spring Cloud和netflix 提供的Eureka等组件之间的版本关系
    启动kafka保错:命令过长语法不正确
    SpringBoot2.0 Config客户端自动刷新时没有/bus/refresh端点
    springcloud config配置采坑 Could not resolve placeholder 'from' in value "${from}报错,巨坑!
    Windows 下安装RabbitMQ服务器及基本配置
    linux 查看日志
    spring 事务原理
    IDEA 配置
    python中给定两个列表,怎么找出他们相同的元素和不同的元素?
  • 原文地址:https://www.cnblogs.com/moqiang02/p/4061200.html
Copyright © 2011-2022 走看看