0

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.

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

3 Comments

and how can i do that ? :)
Install a MySQL GUI SQLYOG (like mine), connect your two DB (PROD & QA), you can find the option to copy PROD -> QA, on your PHP page, use the QA db host/user id/pass.. that's all you need to configure...
thx :) sry i cant up your comment cause i havent got enought reputation :S

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.