最近在看 “高性能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. .zip.001 -- .zip.003解压缩

    一.源文件移到固定短路径 二.cmd执行合并 copy /B 201702.zip.001 + 201702.zip.002 + 201702.zip.003 1.zip 三.WinRAR解压缩

  2. C#学习历程(二)[基础知识]

    c#中类型的转换 1.Convert.ToInt32(string s) 这个方法的返回值是int类型,要用int类型的变量接收 如: string strNum=Console.ReadLine() ...

  3. vs中: 错误,未定义的标识符getline 的解决方法

    这种情况一般都是,在使用的时候没有include<string>而导致的,加上就可以正确编译通过

  4. springmvc用来绑定参数的注解(转)

    引言: 原文链接:http://blog.csdn.net/kobejayandy/article/details/12690161 接上一篇文章,对@RequestMapping进行地址映射讲解之后 ...

  5. Sublime Text 3打开gbk编码的文件中文乱码的问题

    正在开发Wordpress主题,网上下载了一个博客模板,打开之后,发现里面的中文全是乱码 毕竟这玩意是外国人的东西,gbk是中文专用的编码,不支持很正常. 网上查了一下资料,需要安装一个Convert ...

  6. c++ 字符串查找函数

    头文件:#include <string.h> 定义函数:int strcasecmp (const char *s1, const char *s2); 函数说明:strcasecmp( ...

  7. Rhel7安装及网卡、yum、vmtools配置和修改主机名

    (1)安装Vmware WorkStation 11.0 和 RetHatEnterpriseLinux[RHEL]7.0 步骤就不描述了,网上都可以找到 (2)安装VMware Tools )虚拟机 ...

  8. asp.net core microservices 架构之eureka服务发现

    一 简介 微服务将需多的功能拆分为许多的轻量级的子应用,这些子应用相互调度.好处就是轻量级,完全符合了敏捷开发的精神.我们知道ut(单元测试),不仅仅提高我们的程序的健壮性,而且可以强制将类和方法的设 ...

  9. 为什么要使用ORM技术?和 JDBC 有何不一样?

    为什么要使用ORM技术?和 JDBC 有何不一样?        1.繁琐的代码问题:        用JDBC的API编程访问数据库,代码量较大,特别是访问字段较多的表的时候,代码显得繁琐.累赘,容 ...

  10. 排序算法总结(C#版)

    算法质量的衡量标准: 1:时间复杂度:分析关键字比较次数和记录的移动次数: 2:空间复杂度:需要的辅助内存: 3:稳定性:相同的关键字计算后,次序是否不变. 简单排序方法 .直接插入排序 直接插入排序 ...