1

How can I populate a database from a sql file when I'm in the mysql console? LOAD DATA INFILE doesn't fit my problem. I want to populate the whole database, not only one table. mysql -u root -p database < file.sql won't work either. Because I cannot out of the mysql console.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
OrangeTux
  • 11,142
  • 7
  • 48
  • 73

1 Answers1

-1

You want to bulk insert at commandline? Why not use mysqlimport

shell> mysqlimport [options] db_name textfile1 [textfile2 ...]
Freddie Fabregas
  • 1,162
  • 1
  • 7
  • 17