Generally, there is no data available for testing and use on a brand new MySQL server. MySQL provides us with some sample databases.
Generally, there is no data available for testing and use on a brand new MySQL server. MySQL provides us with some sample databases.
Generally, there is no data available for testing and use on a brand new MySQL server. In this regard, MySQL provides us with some sample databases, based on which we can perform basic operations and stress testing. This document describes how to install the sakila database. The database must be installed in MySQL 5.0 or later versions. The following is the description.
1. Download the seed Database
Download location:
2. Install the seed database sakila
[Root @ localhost ~] # Unzip sakila-db.zip
Archive: sakila-db.zip
Creating: sakila-db/
Inflating: sakila-db/sakila-schema. SQL
Inflating: sakila-db/sakila. mwb
Inflating: sakila-db/sakila-data. SQL
The sakila-schema. SQL file contains all the CREATE statements required to create the structure of the Sakila database including tables, views, stored procedures, and triggers.
The sakila-data. SQL file contains the INSERT statements required to populate the structure created by the sakila-schema. SQL file, along with definitions for triggers that must be created after the initial data load.
The sakila. mwb file is a MySQL Workbench data model that you can open within MySQL Workbench to examine the database structure. For more information, see MySQL Workbench.
[Root @ localhost ~] # Ls
Anaconda-ks.cfg Desktop install. log install. log. syslog sakila-db sakila-db.zip
[Root @ localhost ~] # Cd sakila-db
[Root @ localhost sakila-db] # ls
Sakila-data. SQL sakila. mwb sakila-schema. SQL
[Root @ localhost sakila-db] # mysql-uroot-p Enter password:
[Root @ localhost sakila-db] # mysql-uroot-p Enter password:
3. Verify the installation result
[Root @ localhost sakila-db] # mysql
Root @ localhost [(none)]> show databases;
+ -------------------- +
| Database |
+ -------------------- +
| Information_schema |
| Mysql |
| Performance_schema |
| Sakila |
| Scottdb |
| Tempdb |
| Test |
+ -------------------- +
7 rows in set (0.01 sec)
Root @ localhost [(none)]> use sakila
Database changed
Root @ localhost [sakila]> 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 |
| Marshal |
| Sales_by_film_category |
| Sales_by_store |
| Staff |
| Staff_list |
| Store |
+ ---------------------------- +
23 rows in set (0.00 sec)
Root @ localhost [sakila]> select count (*) from customer;
+ ---------- +
| Count (*) |
+ ---------- +
| 1, 599 |
+ ---------- +
1 row in set (0.01 sec)
For more information, see:
-------------------------------------- Split line --------------------------------------
Install MySQL in Ubuntu 14.04
MySQL authoritative guide (original book version 2nd) Clear Chinese scan PDF
Ubuntu 14.04 LTS install LNMP Nginx \ PHP5 (PHP-FPM) \ MySQL
Build a MySQL Master/Slave server in Ubuntu 14.04
Build a highly available distributed MySQL cluster using Ubuntu 12.04 LTS
Install MySQL5.6 and Python-MySQLdb in the source code of Ubuntu 12.04
MySQL-5.5.38 universal binary Installation
-------------------------------------- Split line --------------------------------------