zoukankan      html  css  js  c++  java
  • Employees Sample Database

    employees数据库创建

    1.下载地址

    https://github.com/datacharmer/test_db

    2.上传服务器并解压

    [root@localhost ~]# unzip test_db-master.zip
    Archive: test_db-master.zip
    e5f310ac7786a2a181a7fc124973725d7aa4ce7c
    creating: test_db-master/
    inflating: test_db-master/Changelog
    inflating: test_db-master/README.md
    inflating: test_db-master/employees.sql
    inflating: test_db-master/employees_partitioned.sql
    inflating: test_db-master/employees_partitioned_5.1.sql
    creating: test_db-master/images/
    inflating: test_db-master/images/employees.gif
    inflating: test_db-master/images/employees.jpg
    inflating: test_db-master/images/employees.png
    inflating: test_db-master/load_departments.dump
    inflating: test_db-master/load_dept_emp.dump
    inflating: test_db-master/load_dept_manager.dump
    inflating: test_db-master/load_employees.dump
    inflating: test_db-master/load_salaries1.dump
    inflating: test_db-master/load_salaries2.dump
    inflating: test_db-master/load_salaries3.dump
    inflating: test_db-master/load_titles.dump
    inflating: test_db-master/objects.sql
    creating: test_db-master/sakila/
    inflating: test_db-master/sakila/README.md
    inflating: test_db-master/sakila/sakila-mv-data.sql
    inflating: test_db-master/sakila/sakila-mv-schema.sql
    inflating: test_db-master/show_elapsed.sql
    inflating: test_db-master/sql_test.sh
    inflating: test_db-master/test_employees_md5.sql
    inflating: test_db-master/test_employees_sha.sql
    inflating: test_db-master/test_versions.sh

    3.安装employees数据库

    [root@localhost test_db-master]# mysql -t < employees.sql 
    +-----------------------------+
    | 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 |
    +------------------+
    +---------------------+
    | data_load_time_diff |
    +---------------------+
    | 00:00:26 |
    +---------------------+
    

    4.检查是否已经加载完毕

    root@localhost [(none)]>show databases;
    +--------------------+
    | Database |
    +--------------------+
    | information_schema |
    | employees |
    | mysql |
    | performance_schema |
    | sys |
    | test |
    +--------------------+
    6 rows in set (0.00 sec)
    
    root@localhost [(none)]>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
    root@localhost [employees]>show tables;
    +----------------------+
    | Tables_in_employees |
    +----------------------+
    | current_dept_emp |
    | departments |
    | dept_emp |
    | dept_emp_latest_date |
    | dept_manager |
    | employees |
    | salaries |
    | titles |
    +----------------------+
    8 rows in set (0.00 sec)
    
  • 相关阅读:
    Ionic Tabs使用
    Angular 4 延缓加载组件
    JSP include 指令
    JSP 执行流程
    Tomcat 配置
    Spring boot 项目创建(Spring Boot 1.5.7 + Spring Data JPA + MySql)
    Java Web Service 学习笔记
    Tomcat 去除项目名称
    Angular 4 路由守卫
    Angular 4 辅助路由
  • 原文地址:https://www.cnblogs.com/hanglinux/p/15249212.html
Copyright © 2011-2022 走看看