Help with database import

https://www.qevo.rf.gd/

I’m trying to import a large database (zipped is 70MB, contaning over 3 million of insert values).
I have the file my-large-db-sql.txt inside my-large-db-sql.txt.zip.
I upload the zip with phpmyadmin but after that I get a blank page, I waited 10 minutes but still nothing… Am I doing something wrong?
Can I upload the file with ftp and load it from console (I don’t know how to do that) or maybe using a php script?

I don’t know how to help you here, but these links may be useful.

Hopefully one of these are helpful!

1 Like

Max file size is 10mb. Split it up

This may help…

https://sqldumpsplitter.net/


1 Like

thank you @KangJL well, I saw the limit to 300MB when chosing the file in phpmyadmin import page. I guess there is some php ini (which doesn’t seems to be editable in file manager) restraining the file size anyway… Am I guessing right?

To everyone: how to load the database dump via mysql console? I can upload via FTP the whole zip, or maybe the unzipped version or unzip in place… but then how to call the console? is it the one I see at the bottom of the phpmyadmin page?

mysql -u username -p password < pathto/dumpfile.sql

I found out, using a 5Mb sql, that I have still a big problem:
Got a packet bigger than 'max_allowed_packet' bytes
I can’t find anywhere in the help what is the value accepted… I hope someone can still hep me

well… seems that 2MB is the actual limit. I have to split the database in 180 pieces of 2MB each… pretty ugly eh?

MySQL has a limit on how large a single query text can be. In our database servers right now, this limit is set to 3145728 byes, or 3 MB.

An SQL database dump typically rebuilds the table contents with a long INSERT query containing many rows. A good dump puts them in small batches of, say, 1000 rows each, which should be safe unless your database rows are very big. Some export tools lump the entire table in a single query, which will also cause problems with larger tables.

The batches probably have to be split in smaller sizes for it to work.

The actual limit varies a lot. There is an upload file size, PHP (phpMyAdmin) input processing time limit and execution time limit and various MySQL limits to be considered.

Splitting the dump into 2 MB chunks is one way to work around them. But perhaps with differently constructed database dump (e.g. a somewhat larger file with more and smaller queries) you can safe some trouble too.

4 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.