Page 1 of 1
executing a .SQL file
Posted: Tue May 16, 2006 1:38 am
by psychotomus
how can I execute a .SQL file. I just bought a couple databases and there's no install file. there just in .SQL file. i can't import them by uploading them due to the fact that the files are ove 8MB and my host only allows 8MB uploading.
Posted: Tue May 16, 2006 6:00 am
by JayBird
Zip the SQL file, upload it to your sever...then uncompress it from the command line and execute it.
Posted: Tue May 16, 2006 6:08 am
by Benjamin
Executing an .sql file isn't really possible. .SQL files are generally plain text database exports. The best idea would be to upload it, then import it from a command line if you know how. Otherwise you could install phpMyAdmin, open the .sql file in a text editor, and import the database 1 table at a time for example.
Posted: Tue May 16, 2006 7:36 am
by velo
One thing I find terribly annoying is that is you export a db from PHPMyAdmin and then try to reimport it, the comments within the .sql will often cause the queries in the .sql to fail. So I've usually had to go through and remove all the commented lines. Not a tragedy, of course, just annoying and something to keep in mind......
Posted: Tue May 16, 2006 7:39 am
by feyd
Read through raghavan20's posts in the regex board, there are several applicable to running an sql file.