Does anyone know a PHP script that will clone an entire MySQL database to another on another server? How kind of backup?
You will have a PHP script running (e.g. exec () or system () call), e.g.
mysqldump -q -C --databases mydatabase | mysql -C -h othermachine
Add appropriate flags to these commands to specify credentials, etc.
phpMyAdmin does it very well. Of course, if you have shell access, try this instead:
mysqldump -u [username] -p [password] [database] > [filename]
You can refer to this link. -
http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html
This page is called
MYSQL DUMP - database backup program
It contains all the details.
Hope this helps you.
Source: https://habr.com/ru/post/889807/More articles:Are variables outside functions global variables? - variablesLogout Facebook C # SDK - c #Emacs mouse support over ssh terminal - emacsWhat is the most efficient way to download YouTube videos via jQuery when clicking on a user? - jqueryCopy database with data in MySQL - phpParallel Sum for Vectors - c ++Can I depend on the behavior of charCodeAt () and fromCharCode () to stay the same? - javascriptOne user for each database and one user for all databases - mysqlHow can I fill patch objects using a color map instead of a solid color? - matlabanyone know a good ajax script downloader - javascriptAll Articles