How to export database using CMD or SSH. - Magesan

How to export database using CMD or SSH.

How to export database using CMD or SSH.

Exporting database is an essential part of our daily working need with computers.

In localhost or even on live server. This command can be used anywhere for exporting database.

  1. In localhost or say xampp, you can follow this command in CMD by going in the path given below.

Go to the => xampp/mysql/bin

Inside above path in cmd and perform below command for exporting database.

mysqldump -u root -p database_name > file_name.sql

2. In live server using ssh you can use following command

find you root directory path perform this command.

mysqldump -h live_server_host -u server_user -p server_databasename > test.sql

That’s it. Your database can be exported now and use it with your needs.

Leave a Reply

Your email address will not be published. Required fields are marked *.

You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>