MySQL 示例数据库sakila-db的安装
最近在看 “高性能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的安装的更多相关文章
- mysql 示例数据库安装
示例数据库不和bin安装文件在一块, 安装数据库没有这个选项 https://dev.mysql.com/doc/index-other.html
- MySQL 示例数据库 employees 详解
[引子] IT这一行在我看来是比较要求动手能力的,但是人非生而知之:人们身上的技能除了一些本能之外,大多都是通过学习而得到的. 前一段时间一直在整理素材,写一个关于explain 的系列文章:在一开始 ...
- MySQL 示例数据库
微软 SQL Server 自带了一些示例数据库,可用于练习和测试.也可作为自己数据库设计时的参考.这些示例数据库开源在了 GitHub,可在 Microsoft/sql-server-samples ...
- 导入 Mysql 示例数据库 employees
Mysql也有跟Oracle的scott与employees相似的数据库,这样就免除了每次都要自己建表并插入数据了. Mysql提供的供练习使用的数据库employees,下面地址:https://l ...
- MySQL示例数据库导入_1
做个测试需要有适当量的数据库,于是找到了下面这个MySQL(超过30w记录), 1)先Git clone https://github.com/datacharmer/test_db ...
- Mysql示例数据库employees.sql导入问题
Mysql版本:Server version: 5.7.9-log MySQL Community Server (GPL) 问题一.Unknown system variable 'storage_ ...
- MySQL安装示例数据库
MySQL安装示例数据库 本文档演示如何下载及安装MySQL示例数据库sakila及employees数据库 1. 安装sakila数据库 1.1 下载sakila数据库 wget http://do ...
- JDBC + MySQL 示例
jdbc mysql connection 教程 翻译自:JDBC MySQL Connection Tutorial Java Database Connectivity (JDBC) 是一个基于J ...
- MySQL 安装示例数据库(employee、world、sakila、menagerie 等)
sakila 示例数据库官方资料及安装说明,注意查看示例数据库支持的版本是否匹配你的数据库. 为了测试,有时候需要大量的数据集,MySQL 官方提供了用于测试的示例数据库,下载页面在 这里. 下面以 ...
随机推荐
- brew: Nginx https config
下载安装Brew: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/mas ...
- L140
一本载有许多时装照片的杂志是用带有光泽的优质纸印制的.A glossy magazine has lots of pictures of fashionable clothes and is prin ...
- How to Have a Healthy Relationship --shanbei 为单身节写
我在扇贝发现一片好文. Sometimes relationships can seem like a lot of work until you sit back and realize just ...
- 【git】不同协议的路径
https https://github.com/yesuuu/ganLearn.git ssh git@github.com:yesuuu/ganLearn.git git@idc:ganLearn ...
- JavaScript JSON.parse()和JSON.stringify()
parse用于从一个字符串中解析出json对象,如 var str = '{"name":"huangxiaojian","age":&qu ...
- 记录一个因sqlmap导致的错误
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE sqlMap PUBLIC "- ...
- (三十八)js之柯里化
先给大家介绍什么是柯里化与反柯里化 百度翻译: 在计算机科学中,柯里化(Currying)是把接受多个参数的函数变换成接受一个单一参数(最初函数的第一个参数)的函数,并且返回接受余下的参数且返回结果的 ...
- SQL面试题-行列互换-if、【case when】
http://www.cda.cn/view/21469.html tb_lemon_grade中,表中字段id,student_name,course,score分别表示成绩id,学生姓名,课程名称 ...
- 接口测试基础——第4篇logging模块
Logging:日志记录是为了跟踪记录软件运行时,发生的事件,包括出错,提示信息等等. log日志级别:日志级别大小关系为:CRITICAL > ERROR > WARNING > ...
- JavaScript 冒号(:)详解
1.switch语句分支 2.?:三元表达式的false 3.声明对象直接量的成员 4.声明标签 1和2相信地球人都知道吧?如果有人不知道,那我改成地球上的程序员都知道,哈哈 3.对象直接量我们也经常 ...