3、参考解压方式:
A. employees_db_full-1.0.6.tar.bz2
B. 解压后,查看包的内容:
C.切换到employee_db查看相关文档信息(一般为脚本文档,给予导入参考命令说明):
D.此时,看到有“README”,恭喜你,找到了,操作指导说明书,打开看看,就能知道如何正确导入数据库了:
D.以下内容就是官方指导说明安装语法和操作步骤了:
E.参考指导说明文档,依次执行就顺利完成了,然后将employee数据库导入到mysql数据库中:
小编使用两种方法,同样的思路(均将指定root用户身份,将数据导入,不同的是一个是:#mysql -uroot -p source employees.sql,此时已经是验证后密码,所以不需要再次验证了。)
//To import the data into your MySQL instance, load the data through the mysql command-line tool
//You can validate the Employee data using two methods, md5 and sha. Two SQL scripts are provided
for this purpose, test_employees_sha.sql and test_employees_md5.sql. To run the tests,use mysql
F.以上是导入employee库的操作步骤,仅供参考。
4、导入world库的步骤:
A.解压world压缩包文件:
B.类似于employee库一样,查看脚本文档,参考命令提示后,执行导入步骤,不同的是world库里,没有README文档,此时查看“world_innodb.sql”即可:
此时,注意如果原库中,存在相同的‘city’表,那么避免安装失败,要及时将原库中的‘city’表删除。
但,原库中,不存在world库,所以因此要创建world库,在world中将数据表导入进来,此次遵循数据导入导出原则:
Issue a SOURCE command to tell mysql to read and process the contents of world.sql
mysql>source world_innodb.sql;
D.查看数据表是否,导入成功:
5.导入sakila库:
A.类似的方式,先解压包,查看:
B.查看相关指导文档,以便于正确的方式导入数据库:
C.用root身份进入数据库:
Connect to the MySQL server using the mysql command-line client with the following command:
D.使用source命令导入数据:
E.查看是否成功: