3 ways to import large SQL files into MySQL database

3 ways to import large SQL files into MySQL database
February 4, 2022 No Comments Tutorial rhalp10

Are you having trouble importing large SQL files into mysql/mariadb or even hosting sites such as GoDaddy or Hostinger?

Here are some methods for importing it that we hope will work for you.

1. Using CMD (Command Prompt)
mysql -u root -p databasename < "C:\downloads\sql\large_table.sql"

//use this instead if you have blob / json
mysqldump -u root -p databasename --hex-blob < "C:\downloads\sql\large_table.sql" 
2. Configure WAMP / XAMP to increase upload and post limit.
STEP 1
3. SQL dump splitter

SqlDumpSplittr is a Windows tool with a simple step-by-step wizard to split SQL text dumps from MySQL and PostgreSQL into several files with defined file size. PHP upload limits are not an issue anymore. Just split your dumps into pieces and upload it.SqlDumpSplittr is creating one SQL file with the CREATE and ALTER statements, and several files with INSERT or COPY statements of the data.

Download SQL dump splitter:

STEP 1:

Click the Right arrow, For the Next

STEP 2:

Click Browse > Select you SQL file

Select your Database engine

Click the Right arrow, For the Next

STEP 3:

Click Browse > Choose the location where you want the file saved

I recommend 5 MB for the maximum file size and mark check on ignore SQL comment lines

Click the Right arrow, For the Next

STEP 4:

On this panel, you will see the splitting process and have the option to cancel it by clicking Abort splitting

Click the Right arrow, For the Next

STEP 5:

This panel contains a summary of the process

https://stackoverflow.com/questions/38759870/xampp-mysql-table-doesnt-exist-in-engine-1932/48656159#48656159

https://stackoverflow.com/questions/22637733/mysql-error-code-1118-row-size-too-large-8126-changing-some-columns-to-te

Tags
About The Author
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x