简体   繁体   中英

Export database from my live server to my localhost with php?

I have a big sql database and its run in a "live" server. If any bug occurs I usually export the database manually from phpmyadmin ( view output text ) then I drop the localhost database and import the output dump and import the procedures as well. I want to make a PHP file to make this just one click. Could you help me how can I connect to the live server . export the database I want. After connect to my localhost drop the current export the previously made SQL file and import the current procedures?

Thank you Sorry for bad english, this is my first question.

It is not possible to copy the database from live server to your localhost. But you can do this tricks.

Create another QA database on the same server. Copy the PROD database into that with PHP script . Connect your localhost with that QA database .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM