pet.txt文件加载到数据库方法
1、先创建pet.txt,注意里面要用TAB键隔开,路径如下:
C:/wamp/bin/mysql/mysql5.1.33/lujing/pet.txt
2、进入mysql
c:/wamp/bin/mysql/mysql5.1.33/bin/mysql -u root -p
Enter password:*******
mysql>show databases;
mysql>use test
mysql>load data local infile '../lujing/pet.txt' into table pet;
Query OK;
哈哈成功导入内容。
详见http://dev.mysql.com/doc/refman/5.1/zh/tutorial.html#creating-database