Tuesday, April 19, 2016

Importing sql file in mysql WAMP

1. left click wamp -> phpmyadmin
2. select database then click import (top right)
3. locate the database and click go.
and using command line try this..
The easiest way for me to import an sql file into a database in WAMP environment using command line is using following:
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
password_optional_if_you_have_one This line basically connects you to the mysql database of your choice. 3. To make things easier, I copy my SQL file into the same folder where the mysql.exe file is located. And then run this mysql> source myfilename.sql;