0

I would like to know how I can backup Mysql tables from hosting server to my local pc? I don't want to use phpMyAdmin, is there some simple commands to do that(I use PHP)? and how to restore it back to hosting server?
I assume it will use csv file.

Any help will be appreciated.

4
Contributors
3
Replies
6
Views
12 Years
Discussion Span
Last Post by william_stam
0

Hi
I use mysqlhotcopy; it runs from the command line. I don't remember if it comes default with MySql, it may not. But if not, It's easy to find on the web and install.
After you run it, you can tar up the directory it creates and ftp over to your local machine.
Putting it back on your server is a little more tricky. You'd have to stop the DB. Send the file over to the server. Decompress/untar it. Make sure the permissions are correct on all files (they should be). And then start up the DB again.
By the way, My server is a linux box. I'm not sure if mysqlhotcopy is available for Windows/Mac servers.

Mike

0

I would like to know how I can backup Mysql tables from hosting server to my local pc? I don't want to use phpMyAdmin, is there some simple commands to do that(I use PHP)? and how to restore it back to hosting server?
I assume it will use csv file.

Any help will be appreciated.

Please free download MySQL Auto Backup at http://www.mysqlautobackup.com to help you to backup your MySQL databases automatically.

0

you will need to have the database servers ip or dns name

mysqldump --opt databasename > path_and_filname.sql

or from your cmd prompt

mysqldump -h hostserver -u username -ppasword --opt databasename > path_and_filname.sql

restoring it is the above with the > changed to < if im not mistaken

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.