Jul 11, 2008 - 09:39 PM
So you have a file named with a .sql. A file of this sort is nothing more than a script that an SQL server can understand. Kind of like a shell script. Except it's executed using the SQL server instead of the shell.
The .sql files are good for backing-up your database or for initializing its structure for a project.
The following may vary depending on your OS.
mysql db_name < /path to file/file.sql
or you could try
mysql -e "source /path-to-file/file.sql" db_name
You can also log in to your mysql command line client and at the prompt type
Keep in mind that the path to the file is going to vary depending on whether your mySQL server is running on a Windows or *nix machine( "/", or "\" and the addition of "Dive Letter:\").
You can find out more concerning mySQL here:
Hope this was helpful.
Mar 04, 2009 - 06:09 AM
The Quomon Team