Question:

Is it possible to download a backup of a mysql database without using phpmyadmin?

by  |  earlier

0 LIKES UnLike

Is it possible to download a backup of a mysql database without using phpmyadmin?

 Tags:

   Report

1 ANSWERS


  1. This depends on what you're doing, and how you're accessing your database.  For starters, I'm not really sure what you're asking.  I think you mean to say that you want to make a backup copy of your database, and you want to get that backup copy to your computer somehow.

    phpMyAdmin actually has very little if anything to do with the MySQL database itself.  It's more like a viewer that lets you look at the database more easily through a web front end.  So whatever it's doing, you can do through other means.

    The trouble is, I don't know the particulars of your situation.  Can you access the system on a command prompt?  If so, you can probably use the mysqldump command.  Supposing you had a database named "hogswollop", and you wanted the backup file to be "hog.txt", you could create a text backup file by using the command:

    mysqldump hogswollop > hog.txt

    You may also need to specify your username, password, MySQL port number, server host, or other parameters (depending on your setup).  If you can't find the "mysqldump" command, you can try:

    locate mysqldump

    (This may or may not be able to find it for you, again, depending on your setup.)  Anyway, mysqldump will get you the list of SQL commands necessary to re-construct your database.  To read it back in, you can do:

    mysql < hog.txt

    (again, you may need to specify other parameters like userid, port, etc).

    You may also be able to copy the table binaries in the MySQL data directories, although this can be a little less versatile if for some reason you run a different version of MySQL on the system you're restoring from backups (if, say, you did the backup, upgraded MySQL, then tried to restore from the backup).

    All this assumes you have access to the command line on a unix/linux-style platform where mysql is running.  If not, chances are that someone else is in charge of running your MySQL database, and (most likely) they've only given you access through phpMyAdmin.  In that case, you'll have to talk to your database admin (or ISP) to find out what other options they're providing for you.

    DaveE

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.