Import a CSV file into MySQLĪn alternative to running a SQL file in MySQL is to import a CSV file into an existing database. You can either drop the table before importing the SQL file or modify the SQL file to exclude the table creation statement. To load the text file pet.txt into the pet table, use this statement: mysql> LOAD DATA LOCAL INFILE /path/pet.txt INTO TABLE pet If you created the file on Windows with an editor that uses rn as a line terminator, you should use this statement instead: mysql> LOAD DATA LOCAL INFILE /path/pet. Run ALTER TABLE tablename DISCARD TABLESPACE Copy the ibd file to tablename.ibd in the target location. Create the table with the same structure. Using CMD (Command Prompt) Utilizing the command line interface (CMD or Terminal) to import large SQL files can be an effective solution. You will need to know the exact structure of the table (the CREATE TABLE statement). Configure WAMP / XAMP to increase upload and post limit.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |