0

I am reasonably familiar with the

use db1; insert into db2.table1 ( fields ) select fields from table1...

syntax to copy data from one db table to a table in another db.

But is it possible to extend this further and specify that the target db is on a different server? i.e. can I use some sort of dsn string to specifiy the target?

I don't expect it'll be hugely efficient but it'll be useful for me for testing "official" test db data on my local mini-development machine.

Cheers

Bill

Bill Parker
  • 765
  • 5
  • 4
  • Possible duplicate of [MySQL Cross Server Select Query](http://stackoverflow.com/questions/810349/mysql-cross-server-select-query) – apokryfos Apr 13 '16 at 15:41

1 Answers1

0

You can set up federated tables to accomplish what you're trying to do. http://dev.mysql.com/doc/refman/5.0/en/federated-use.html

Yassine LD
  • 137
  • 1
  • 1
  • 11