最近在看 “高性能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. ionic2——开发利器之Visual Studio Code 常用快捷键

    主命令框 F1 或 Ctrl+Shift+P: 打开命令面板.在打开的输入框内,可以输入任何命令,例如: 按一下 Backspace 会进入到 Ctrl+P 模式 在 Ctrl+P 下输入 >  ...

  2. OC-协议与代理

    [协议]================================================================ @protocol [协议的作用]:规定了需要实现的接口方法, ...

  3. L143 Seasonal 'Plague' Hits College Freshman

    Sometimes, all the hand sanitizer in the world cannot prevent the inevitable.College freshmen across ...

  4. 《深入理解java虚拟机》学习笔记之编译优化技术

    郑重声明:本片博客是学习<深入理解Java虚拟机>一书所记录的笔记,内容基本为书中知识. Java程序员有一个共识,以编译方式执行本地代码比解释方式更快,之所以有这样的共识,除去虚拟机解释 ...

  5. 再读《Java编程思想 》

    前段时间在豆瓣上无意间看到一个帖子"我为什么把thinking in java 读了10遍",是11年的帖子,下面评论至今,各种声音都有,不过大多数还是佩服和支持的.我个人来讲也是 ...

  6. HTTP Status 500 - Error instantiating servlet class XXXX

    问题描述 web项目中请求出现错误,如下:  HTTP Status 500 - Error instantiating servlet class XXXX类  type Exception rep ...

  7. 关于Hibernate在反向工程时无法选择Spring DAO Type的解决方法【更新版】

    目录(?)[+] IT程序员开发必备-各类资源下载清单,史上最全IT资源,个人收藏总结! 之前有一篇文章中(Hibernate反向工程步骤及DAO Type无法选择Spring DAO解决方法)提到, ...

  8. Windows 7 扩展玻璃效果(Aero Glass)

    转自:http://www.cnblogs.com/gnielee/archive/2010/10/04/windows7-extend-aero-glass.html Windows 7 操作系统默 ...

  9. HttpContext.Current.Cache和HttpRuntime.Cache的区别,以及System.Runtime.Caching

    先看MSDN上的解释:      HttpContext.Current.Cache:为当前 HTTP 请求获取Cache对象.      HttpRuntime.Cache:获取当前应用程序的Cac ...

  10. ArcGIS_Server的安装

    1.双击ArcGIS_for_Server_Windows_103_142101.exe 2.下一步 3.关闭 4.Win10系统弹出询问框是否更改程序,点击“”是“” 5.开始安装程序,点击next ...