-1

I have use Ubuntu 14.04, in mysql, not able to login through phpmyadmin. So, i need to backup mysql database. How can i do this. any one help for this issues.

advanced thanks.

By Udaya Kumar-PHP

  • Start with [this](https://askubuntu.com/questions/341584/how-to-run-mysql-command-from-terminal), follow with [this](https://stackoverflow.com/questions/7423654/export-dump-file-from-mysql) – schrodingerscatcuriosity Jun 22 '19 at 17:17

1 Answers1

2

That is easily done by going to a terminal window by pressing Ctrl+Alt+T and typing:

For a single database:

mysqldump -u szUserName -p szDatabaseName > /path/to/file

For multiple databases:

mysqldump -u szUserName -p --databases szDatabaseName1  szDatabaseName2 szDatabaseName3 > /path/to/file 

For all databases:

mysqldump -u szUserName -p --all-databases > /path/to/file 

Where szUserName is obviously your username, szDatabaseName1 is *your database name and /path/to/file is the path to the export file E.G. ./dump/db_backup.sql

Fabby
  • 34,341
  • 38
  • 97
  • 191
Khan21
  • 21
  • 1
  • 1
    Welcome to [ubuntu.se]! **;-)** You just received an edit *and* your first upvote! **0:-)** Could you please review my **[edits](https://askubuntu.com/posts/1153508/revisions)** and also review the [editing help](/editing-help) to improve the readability of your answers in the future... **;-)** – Fabby Jun 25 '19 at 12:15