Your Ad can be there
+ Post New Thread
Results 1 to 8 of 8

Thread: How to Back Up and Restore a MySQL Database?

  1. #1
    Junior Member MelissaCaddy1's Avatar
    Join Date
    Aug 2015
    Location
    India
    Posts
    8

    How to Back Up and Restore a MySQL Database?

    Please share the commands for creating and restoring database backups.
    Dedicated Server Hosting Support Team

  2. #2
    Administrator
    Join Date
    Mar 2013
    Posts
    2,723


    Is this useful / helpfull? Yes | No
    If You are having Linux server, you can do it from within command line: http://internetlifeforum.com/mysql-apache-php/471-how-backup-restore-mysql-dump-file-linux-command-line/
    Else backup can be usually made from within your hosting control panel..

  3. #3


    Is this useful / helpfull? Yes | No
    Please try the below steps ...
    Open phpMyAdmin.
    Select your database by clicking the database name in the list on the left of the screen.
    Click the Export link. ...
    In the Export area, click the Select All link to choose all of the tables in your database.

  4. #4
    Junior Member tivanov's Avatar
    Join Date
    Aug 2017
    Posts
    3


    Is this useful / helpfull? Yes | No
    Create dump:
    Code:
    mysqldump db_name table_name > db.table.sql
    Restore dump:
    Code:
    mysql db_name < db_name.sql

  5. #5
    Administrator
    Join Date
    Mar 2013
    Posts
    2,723


    Is this useful / helpfull? Yes | No
    Quote Originally Posted by tivanov View Post
    Code:
    mysqldump db_name table_name > db.table.sql
    To dump whole database instead of just one table, try:
    Code:
    mysqldump -u databaseusername -p databasename > db.sql

  6. #6


    Is this useful / helpfull? Yes | No
    If you want to backup and restore of MySQL database then you can run command:
    You can run below command:
    mysqldump db_name > db_name.sql

    If you want to restore backup then you can run below command:
    mysql db_name < db_name.sql

    For more details regarding this, you can manage MySQL database.

  7. #7


    Is this useful / helpfull? Yes | No
    You can run below command:-
    --> mysqldump database_name > database_name.sql


    If you want to restore backup then you can run below command:-
    --> mysql database_name < database_name.sql
    HiFiveHost : ★★ Fully Managed & Secure Web Hosting Solutions ★★ 24x7 Technical Support : Certified Professional : Server Management ★★

  8. #8


    Is this useful / helpfull? Yes | No
    In order to protect your MySQL database from accidental or malicious deletion, you should use a backup. With a backup of your database, you can restore it to any point in time if necessary. There are many methods for backing up and restoring a MySQL database, so read on for information on the most popular methods.

    One popular method for backing up and restoring a MySQL database is using the mysql client command line utility. To back up a MySQL database using this method, first create a local copy of your database by running the following command:

    mysql -u root -p <database_name> <backup_directory>
    where <database_name> is the name of your database and <backup_directory> is the directory where you want to store the backup file.

+ Post New Thread

Similar Threads

  1. Replies: 0
    Last Post: 04-15-2017, 09:16 AM
  2. Is inconsistent mysql database file restorable / how?
    By Fli in forum MySQL, Apache, PHP
    Replies: 0
    Last Post: 03-29-2015, 03:26 PM
  3. Unable to import mySQL database for CPanel webhosting?
    By webc in forum PHP, MySQL Forum
    Replies: 1
    Last Post: 03-23-2014, 04:18 PM
  4. Replies: 0
    Last Post: 11-19-2013, 06:07 PM
  5. Replies: 1
    Last Post: 07-14-2013, 11:12 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
 Protected by : ZB BLOCK  &  StopForumSpam