最近在看 “高性能MySql”这本神书,发现上面很多例子采用的官方示例数据库sakila。

官方示例数据库

下载地址

http://dev.mysql.com/doc/index-other.html

Documenation - Other Docs - Example Databases 示例库和文档放到了一起  跳转到下载界面。

解压导入sakila数据库

上传文件到任意路径下

[root@localhost etc]# ll
总用量 756
-rw-r--r-- 1 root root 741613 7月 6 17:53 sakila-db.zip

  

解压文件

 

[root@localhost etc]# unzip sakila-db.zip
Archive: sakila-db.zip
creating: sakila-db/
inflating: sakila-db/sakila-data.sql
inflating: sakila-db/sakila-schema.sql
inflating: sakila-db/sakila.mwb

  

解压后,可以看见有如下文件

[root@localhost sakila-db]# ll
总用量 3396
-rw-r--r-- 1 root root 3398148 7月 21 2016 sakila-data.sql
-rw-r--r-- 1 root root 50019 7月 21 2016 sakila.mwb
-rw-r--r-- 1 root root 23424 7月 21 2016 sakila-schema.sql

  

导入sql文件

[root@localhost sakila-db]#  mysql -uroot -p <sakila-schema.sql
Enter password:
[root@localhost sakila-db]# mysql -uroot -p <sakila-data.sql
Enter password:
[root@localhost sakila-db]#

 检查导入的数据是否成功(两种检测方法任选一种就可以)

[root@localhost sakila-db]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 30659
Server version: 5.6.36-log Source distribution Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
mysql>
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| jfedu |
| mysql |
| performance_schema |
| sakila |
| test |
| zabbix |
+--------------------+
7 rows in set (0.01 sec) mysql> use sakila
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_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>

  示例数据库导入完成

MySQL 示例数据库sakila-db的安装的更多相关文章

  1. mysql 示例数据库安装

    示例数据库不和bin安装文件在一块, 安装数据库没有这个选项 https://dev.mysql.com/doc/index-other.html

  2. MySQL 示例数据库 employees 详解

    [引子] IT这一行在我看来是比较要求动手能力的,但是人非生而知之:人们身上的技能除了一些本能之外,大多都是通过学习而得到的. 前一段时间一直在整理素材,写一个关于explain 的系列文章:在一开始 ...

  3. MySQL 示例数据库

    微软 SQL Server 自带了一些示例数据库,可用于练习和测试.也可作为自己数据库设计时的参考.这些示例数据库开源在了 GitHub,可在 Microsoft/sql-server-samples ...

  4. 导入 Mysql 示例数据库 employees

    Mysql也有跟Oracle的scott与employees相似的数据库,这样就免除了每次都要自己建表并插入数据了. Mysql提供的供练习使用的数据库employees,下面地址:https://l ...

  5. MySQL示例数据库导入_1

    做个测试需要有适当量的数据库,于是找到了下面这个MySQL(超过30w记录), 1)先Git clone https://github.com/datacharmer/test_db         ...

  6. Mysql示例数据库employees.sql导入问题

    Mysql版本:Server version: 5.7.9-log MySQL Community Server (GPL) 问题一.Unknown system variable 'storage_ ...

  7. MySQL安装示例数据库

    MySQL安装示例数据库 本文档演示如何下载及安装MySQL示例数据库sakila及employees数据库 1. 安装sakila数据库 1.1 下载sakila数据库 wget http://do ...

  8. JDBC + MySQL 示例

    jdbc mysql connection 教程 翻译自:JDBC MySQL Connection Tutorial Java Database Connectivity (JDBC) 是一个基于J ...

  9. MySQL 安装示例数据库(employee、world、sakila、menagerie 等)

    sakila 示例数据库官方资料及安装说明,注意查看示例数据库支持的版本是否匹配你的数据库. 为了测试,有时候需要大量的数据集,MySQL 官方提供了用于测试的示例数据库,下载页面在 这里. 下面以 ...

随机推荐

  1. ASM9260T开发板使用

    ifconfig eth0 192.168.1.66 netmask 255.255.255.0 up   //设备iproute add default gw 192.168.1.1   //添加网 ...

  2. Oracle RAC(Real Application Clusters)

    Oracle RAC 运行于集群之上,为 Oracle 数据库提供了最高级别的可用性.可伸缩性和低成本计算能力.如果集群内的一个节点发生故障,Oracle 将可以继续在其余的节点上运行.Oracle ...

  3. Struts04---命名空间的查询顺序以及默认执行的Action

    01.创建login.jsp <%@ page language="java" import="java.util.*" pageEncoding=&qu ...

  4. UI-不常用控件 UIActivityIndicatorView、UIProgressView、UISegmentedControl、UIStepper、UISwitch、UITextView、UIAlertController

    1 //UIActivityIndicatorView //小菊花,加载================================================================ ...

  5. 关于json解析和所需jar

    以解析字符串数组为例: String parameter= [{"id":"pdTNKcY1YS55oG2M",.......}] 1. 关于net.sf.js ...

  6. Python 字符串相似性的几种度量方法

    字符串的相似性比较应用场合很多,像拼写纠错.文本去重.上下文相似性等. 评价字符串相似度最常见的办法就是:把一个字符串通过插入.删除或替换这样的编辑操作,变成另外一个字符串,所需要的最少编辑次数,这种 ...

  7. 【英语】TED视频笔记

    2014-09-22 讲话的七宗罪呢:流言蜚语.评判.消极.抱怨.借口.浮夸.固执己见. 讲话的四个要素:HAIL - 诚实,做自己,说到做到,爱. 2014-09-23 Do more of the ...

  8. js实现tab页面不同内容切换显示

    效果      实现的思路如下: controller层同时把两个内容都查处理 前端html用js控制显示 (1)前端的tab代码 (2)tab内容的结构 (3)关键部分 js $(".hd ...

  9. 调试SPRING MVC(或者整合SSH)的时候遇到了org/objectweb/asm/Type

    调试SPRING MVC(或者整合SSH)的时候遇到了org/objectweb/asm/Type 解决方法1: 原因是Spring中的cglib-nodep-2.x.x.jar与Hibernate中 ...

  10. maven命令行创建web项目报错:java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils

    早上一上班就想新建一个web项目玩玩,没想到一敲命令创建就失败了,真是出师不利.各种折腾无果,当然我也可以用eclipse直接创建的,就是不甘心被这破问题给耍了.刚刚才发现问题原因,这个结果我也是醉了 ...