Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to import a very large query over phpmyadmin?

if my host does not allow me to upload a file directly to my mysql folder and i can only do so throught phpmyadmin? are there any alternatives aside from its native import feature so that my connection would not time out while uploading a query that's around 8mb?

like image 779
lock Avatar asked Dec 13 '22 05:12

lock


1 Answers

you can gzip or bzip the file and phpMyAdmin will decompress and run the script.

otherwise what I've had to do in the past is split my SQL into a number of files and load each one individually. You can do this simply by opening the SQL file in a text editor, scroll to about half way down, find the start of a statement and move everything after that into another file.

like image 119
nickf Avatar answered Dec 15 '22 18:12

nickf