executing a .SQL file
Moderator: General Moderators
-
psychotomus
- Forum Contributor
- Posts: 487
- Joined: Fri Jul 11, 2003 1:59 am
executing a .SQL file
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.
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.
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......