zoukankan      html  css  js  c++  java
  • 【MySQL】MySQL之示例数据库Sakila下载及安装

    本篇将演示如何下载及安装MySQL示例数据库Sakila。

    1、下载Sakila数据库;

    [root@strong ~]# wget http://downloads.mysql.com/docs/sakila-db.tar.gz

    2、解压;

    [root@strong ~]# tar zxvf sakila-db.tar.gz
    [root@strong ~]# ll -h sakila-db/
    total 3.4M
    -rw-r--r--. 1 500 500 3.3M Jul 21  2016 sakila-data.sql --插入语句
    -rw-r--r--. 1 500 500  49K Jul 21  2016 sakila.mwb  --数据模型
    -rw-r--r--. 1 500 500  23K Jul 21  2016 sakila-schema.sql  --创建语句

    3、安装数据库;

    mysql> source ./sakila-db/sakila-schema.sql
    mysql> source ./sakila-db/sakila-data.sql

    4、检查安装的数据库;

    mysql> use sakila
    Database changed
    mysql> show tables;
    +----------------------------+
    | Tables_in_sakila           |
    +----------------------------+
    | actor                      |
    | actor_info                 |
    | address                    |
    | category                   |
    | city                       |
    | country                    |
    | customer                   |
    | customer_list              |
    | film                       |
    | film_actor                 |
    | film_category              |
    | film_list                  |
    | film_text                  |
    | inventory                  |
    | language                   |
    | nicer_but_slower_film_list |
    | payment                    |
    | rental                     |
    | sales_by_film_category     |
    | sales_by_store             |
    | staff                      |
    | staff_list                 |
    | store                      |
    +----------------------------+
    23 rows in set (0.00 sec)
    
    mysql> 

    5、查看数据模型;

    至此,示例数据库安装完毕。

  • 相关阅读:
    day10 基本数据类型(下)
    day09 作业
    day09 基本数据类型(中)
    day08 作业
    day8 for循环+基本数据类型(上)
    Python正课109 —— 前端 进阶8
    Python正课108 —— 前端 进阶7
    Python正课107 —— 前端 进阶6
    Python正课106 —— 前端 进阶 5
    Python正课105 —— 前端 进阶4
  • 原文地址:https://www.cnblogs.com/alen-liu-sz/p/12975672.html
Copyright © 2011-2022 走看看