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,438
  • 68
  • 55
  • 126
OrangeTux
  • 10,436
  • 7
  • 46
  • 72

1 Answers1

-1

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

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