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.
- 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.