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

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

  1. #1
    Junior Member MelissaCaddy1's Avatar
    Join Date
    Aug 2015

    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
    Join Date
    Mar 2013

    Is this useful / helpfull? Yes | No
    If You are having Linux server, you can do it from within 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

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

  5. #5
    Join Date
    Mar 2013

    Is this useful / helpfull? Yes | No
    Quote Originally Posted by tivanov View Post
    mysqldump db_name table_name > db.table.sql
    To dump whole database instead of just one table, try:
    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
    Junior Member HifiveHost's Avatar
    Join Date
    Jun 2022

    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
    Junior Member Lucifer12's Avatar
    Join Date
    Feb 2022

    Is this useful / helpfull? Yes | No
    Using phpMyAdmin to Back Up or Restore MySQL
    If you’re running phpMyAdmin, backing up and restoring your MySQL database is simple.

    Step For Create a MySQL Database Backup
    1. Open phpMyAdmin. On the directory tree on the left, click the database you want to back up.
    2. Click Export on the menu across the top of the display.
    You’ll see a section called “Export Method.” First, use Quick to save a copy of the whole database. Then, choose Custom to select individual tables or other unique options.
    Leave the Format field to SQL unless you have a good reason to change it.
    3. Click Go. If you select Quick, your web browser will download a copy of the database into your specified downloads folder. You can copy that to a safe location.

    Step For Clear the Old Database Information
    1. Open phpMyAdmin, on the navigation pane on the left, choose the database you want to restore.
    2. Click the check all box near the bottom. Then, use the drop-down menu labeled With selected to select Drop.
    3. The tool should prompt you to confirm that you want to go forward. Click yes.
    This will get rid of all the existing data, clearing the way for your restoration.

    Step For Restore Your Backed up MySQL Database
    In phpMyAdmin, the Import tool is used to restore a database.
    1. On the menu across the top, click Import.
    2. The first section is labeled File to import. A couple of lines down, there’s a line that starts with “Browse your computer,” with a button labeled Choose File. Click that button.
    3. Use the dialog box to navigate to the location where you’ve saved the export file that you want to restore. Again, leave all the options set to default. (If you created your backup with different options, you could select those here.)
    4. Click Go.

  9. #9

    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, 08:16 AM
  2. Is inconsistent mysql database file restorable / how?
    By Fli in forum MySQL, Apache, PHP
    Replies: 0
    Last Post: 03-29-2015, 02: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, 03:18 PM
  4. Replies: 0
    Last Post: 11-19-2013, 06:07 PM
  5. Replies: 1
    Last Post: 07-14-2013, 10: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