when you have a sql file you can easily import it in to a database Using wamp.
1. left click wamp -> phpmyadmin
2. select database then click import (top right)
3. locate the database and click go.
You can use the command prompt as well. For that,1. Run the cmd (DOS) and get into the mysql folder, which in my case works like this
C:\>cd C:\wamp\bin\mysql\mysql5.0.51b\bin
2. Then use this command to fire up MySQL
C:\wamp\bin\mysql\mysql5.0.51b\bin>mysql.exe -use databasename -u username -p
you should provide a password if you have one.
After that copy .sql file to directory where mysql.exe is located and run the command ,
mysql> source myfilename.sql;
No comments:
Post a Comment