Re: Migration Scheme - from one mysql DB to another mysql DB
| From: | Phpster | Date: | Sat, 13 Mar 2010 19:40:47 +0000 |
| Subject: | Re: Migration Scheme - from one mysql DB to another mysql DB | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-302783@lists.php.net to get a copy of this message | ||
Rob's approach is what I use as well, if faced with this issue. It's quick and simple to do.
Bastien
Sent from my iPod
On Mar 13, 2010, at 12:47 PM, Robert Cummings <robert@interjinn.com> wrote:
MEM wrote:Hello all, If possible, I would like to ask and have your help about the methods and procedures that should exist to accomplish the following task: I need to grab some data from one mySQL database with some specific table and field names, to another mySQL database with specific table and field names. The destination database tables are empty. What is a common procedure to do on those cases? Is there any? Several? What are the most common? If I need to be more specific in order to benefit from your help, please, let me know.If it's the same server just different databases, then MySQL allows queries between databases and you could do it in a single query. Something like the following: INSERT INTO DB1.TABLE1 ( field1, field2, field3 ) SELECT field1, field2, field3 FROM DB2.TABLE1; Cheers, Rob. --http://www.interjinn.com Application and Templating Framework for PHP --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php