标签:href data 压缩文件 span class cmd erp mysqli index
从官网下载样例数据,参考压缩文件中的README.txt,整理所得
/******************* 样例数据导入 *******************/ /** 官网下载 http://dev.mysql.com/doc/index-other.html **/ /******** db1、menagerie ********/ /******* cmd登录mysql *******/ mysql -P3307 -uroot -p CREATE DATABASE menagerie; USE menagerie; source E:/MySQL/ExampleDatabases/menagerie-db/cr_pet_tbl.sql LOAD DATA LOCAL INFILE ‘E:/MySQL/ExampleDatabases/menagerie-db/pet.txt‘ INTO TABLE pet; # Load中只能用/,其他的\与/都可以使用,它们的区别是什么 SOURCE E:/MySQL/ExampleDatabases/menagerie-db/ins_puff_rec.sql SOURCE E:/MySQL/ExampleDatabases/menagerie-db/cr_event_tbl.sql LOAD DATA LOCAL INFILE ‘E:/MySQL/ExampleDatabases/menagerie-db/event.txt‘ INTO TABLE EVENT; /******** command interpreter ********/ #切换到.sql/.txt文件所在目录 e: cd E:\MySQL\ExampleDatabases\menagerie-db #cd E:/MySQL/ExampleDatabases/menagerie-db mysql -P3307 -uroot -p menagerie < cr_pet_tbl.sql mysql -P3307 -uroot -p menagerie < load_pet_tbl.sql mysqlimport -P3307 -uroot -p menagerie E:\MySQL\ExampleDatabases\menagerie-db\pet.txt #需指定路径,不然就 File ‘E:\mysql\mysql-5.7.15\data\menagerie\xx.txt‘ not found #mysqlimport -P3307 -uroot -p menagerie E:/MySQL/ExampleDatabases/menagerie-db/pet.txt mysql -P3307 -uroot -p menagerie < ins_puff_rec.sql mysql -P3307 -uroot -p menagerie < cr_event_tbl.sql mysqlimport -P3307 -uroot -p menagerie E:\MySQL\ExampleDatabases\menagerie-db\event.txt /******** db2、sakila ********/ /******* cmd登录mysql *******/ mysql -P3307 -uroot -p CREATE DATABASE sakila; USE sakila; source E:/MySQL/ExampleDatabases/sakila-db/sakila-schema.sql source E:/MySQL/ExampleDatabases/sakila-db/sakila-data.sql /******** db3、world ********/ /******* cmd登录mysql *******/ mysql -P3307 -uroot -p CREATE DATABASE world; USE world; source E:/MySQL/ExampleDatabases/world.sql /******** db4、world_x ********/ /******* cmd登录mysql *******/ mysql -P3307 -uroot -p CREATE DATABASE world_x; USE world_x; source E:/MySQL/ExampleDatabases/world_x-db/world_x.sql
标签:href data 压缩文件 span class cmd erp mysqli index
原文地址:http://www.cnblogs.com/ShanFish/p/6259835.html