Announcement

Collapse
No announcement yet.

how to backup mysql database?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to backup mysql database?

    Hi,
    As I know I can use the following command to backup all my databases:

    Code:
    mysqldump --all-databases > all_databases.sql
    I noticed that the above SQL file would not include CREATE DATABASE commands, and doesn't also support the MySQL users and their permissions for each database.
    How can I backup so that the database names and each user assigned to each database on the server ?

  • #2
    You can backup MySQL DB using

    Code:
    mysqldump -u root -p mysql > mysql.sql
    and restore MySQL DB by executing

    Code:
    mysql -u root -p mysql < mysql.sql
    Do not forget to

    Code:
    FLUSH PRIVILEGES
    after restoring dump.

    Hope it will helps...

    Comment


    • #3
      Is there any easy way for taking database backups? I want to avoid such commands and wish to opt for some graphical user interface to manage database backups. I am sure there would be some easier option in my control panel, Im just a noob here

      Comment


      • #4
        If you are on Linux hosting using cpanel then you have an option of using PHPMyAdmin application using which you can take database backups. It's very easy to use being an graphical user interface.

        Comment

        Working...
        X