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.

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

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.