Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

php - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...