安装sakila数据库

sakila 安装

http://dev.mysql.com/doc/sakila/en/sakila-installation.html(这里是windows的安装过程)

下载对应版本linux(ubuntu 14.04)

放到目录 位置 home/chen/Documents/下

解压 tar -zxfv sakila-db.tar

显示3个文件

chen@ubuntu:~/Documents/sakila-db$ ls
sakila-data.sql  sakila.mwb  sakila-schema.sql

首先1, mysql -uroot -p

然后2,mysql -uroot -p

进入mysql

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sakila             |
+--------------------+

查看sakila下的表

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)


你可能感兴趣的:(数据库)