Hello Friend's,
Today, We learn how to Dump & Restore Mysql Database using command prompt.
Now Follow the step by step
Step 1:-Press win key + R and type cmd then press Enter key
Step 2:-Open the Command Propmt
Step 3:-Set temporary mysql path to the windows variables
set path=C:\wamp\bin\mysql\mysql5.6.17\bin
Press Enter Key
Step 4:-After set the location of mysql to the windows variables.You should to check mysql command type mysql on command propmt then press Enter key
Step 5:-After That go the path where you want save mysql dump database file
Example : D:\database\
Step 5:-After That Export/Dump mysql database type the command
mysqldump -u username -p dbname > filename.sql
Example: D:\databas>mysqldump -u root -p drive > drivenew.sql
Then press Enter Key
Step 6:-Now you will notice in D:\database a sql file created of name drivenew.sql
Step 7:-After that you need to first connect mysql to the cmd using syntax
mysql -u root -p
Then press Enter key
Step 8:-After that you need to restore into new database then you need to first create new database
Syntax:
create database filebloom;
Step 9:-Now You can restore your database using syntax
mysql -u username -p dbname < filename.sql;
Example:D:\database>mysql -u root -p filebloom < drivenew.sql;
Thanks For visit my blog, I hope this post is useful many people.
Today, We learn how to Dump & Restore Mysql Database using command prompt.
Now Follow the step by step
Step 1:-Press win key + R and type cmd then press Enter key
Step 2:-Open the Command Propmt
Step 3:-Set temporary mysql path to the windows variables
set path=C:\wamp\bin\mysql\mysql5.6.17\bin
Press Enter Key
Step 4:-After set the location of mysql to the windows variables.You should to check mysql command type mysql on command propmt then press Enter key
Step 5:-After That go the path where you want save mysql dump database file
Example : D:\database\
Step 5:-After That Export/Dump mysql database type the command
mysqldump -u username -p dbname > filename.sql
Example: D:\databas>mysqldump -u root -p drive > drivenew.sql
Then press Enter Key
Step 6:-Now you will notice in D:\database a sql file created of name drivenew.sql
Step 7:-After that you need to first connect mysql to the cmd using syntax
mysql -u root -p
Then press Enter key
Step 8:-After that you need to restore into new database then you need to first create new database
Syntax:
create database filebloom;
Step 9:-Now You can restore your database using syntax
mysql -u username -p dbname < filename.sql;
Example:D:\database>mysql -u root -p filebloom < drivenew.sql;
Thanks For visit my blog, I hope this post is useful many people.
0 comments:
Post a Comment