Posted By

TheJasonParker on 04/19/11


Tagged

mysql wampserver


Versions (?)

Restore MySQL database in WampServer


 / Published in: MySQL
 

URL: http://befused.com/mysql/restore-database-wampserver

Go to the Windows command line by going to Start -> Run and typing in cmd.

You need to change directory to the MySQL bin directory. On my version, the directory is c:\wamp\bin\mysql\mysql4.1.22\bin.

Therefore, the command to change to this directory is: cd wamp\bin\mysql\mysql4.1.22\bin

Put the MySQL dump (SQL file) into the above directory

Create the new database in phpmyAdmin (or on the command line)

The actual restore command is slightly different to normal (see below).

Note that is says mysql.exe rather than the normal mysql. When it asks you for a password, just hit enter. There is no password associated with the database that you created (unless you prefer to have one. But as it is local, there is no need).

  1. mysql.exe -u root -p databasename < filename.sql

Report this snippet  

You need to login to post a comment.