红联Linux门户
Linux帮助

mysql安装sakila样本数据库

发布时间:2016-08-18 09:36:10来源:linux网站作者:CrazyL-
通常情况下对于一个全新的MySQL服务器,没有任何数据供我们测试和使用。对此,MySQL为我们提供了一些样本数据库,我们可以基于这些数据库作基本的操作以及压力测试等等。本文描述的是安装sakila数据库。该数据库需要安装在MySQL 5.0以上的版本。
 
下载sakila-db.zip
http://dev.mysql.com/doc/index-other.html
 
解压,安装:
root@ubuntu:/tools# cd sakila-db/
root@ubuntu:/tools/sakila-db# ls
sakila-data.sql  sakila.mwb  sakila-schema.sql
root@ubuntu:/tools/sakila-db# mysql -uroot -p<sakila-schema.sql
Enter password: 
root@ubuntu:/tools/sakila-db# mysql -uroot -p<sakila-data.sql
Enter password: 
 
或者登陆到mysql:
mysql>source /tools/sakila-db/sakila-schema.sql
mysql>source /tools/sakila-db/sakila-data.sql
 
本文永久更新地址:http://www.linuxdiyf.com/linux/23401.html