SüniÚr
SüniÚr

Reputation: 896

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.

Upvotes: 0

Views: 2257

Answers (1)

Sudip
Sudip

Reputation: 2051

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.

Upvotes: 1

Related Questions