How to export / import a database in MySQL through the command line?
MySQL system configuration, WampServer server installed.
OS: Windows
The advice for my local host, not an live hosting...
|
How to export / import a database in MySQL through the command line? MySQL system configuration, WampServer server installed. OS: Windows The advice for my local host, not an live hosting... |
|||
|
|
|
use |
|||||||||
|
|
To backup:
To import:
|
||||
|
|
Follow the following steps.
Now you'll get mysql command prompt. ** Note Here My MySql version ins 15.5.8 it may change based on your wamp installation. Now you can follow the answer by @Matei. I'm pasting his answer here. Hope this will help you.
|
|||
|
|
|
To export data in mysql through msdos is Goto->the bin folder of your mysql directory and search for mysqldump or put it in environmental variables to access it from anywhere 1.if user is root with no password mysqldump -uroot -p mydb > backup.sql 2.if username and password mysqldump -u -p > backup.sqp (provide the username and password and dbname) |
|||
|
|