how to insert Data One database into another Database
I have two MySQL databases DB1 and DB2, DB1 is on Online server, and DB2 is on local machine(localhost), Now i want to insert some data into DB2's table named db2_table from DB1's table named db1_table using MySQL QUERY. So it is possible or not?
if you are on the same server you can do something like
INSERT INTO DB2.db2_table (col1, col2, ..., colN) SELECT col1, col2 FROM DB1.db1_table WHERE ...
but being on different servers you can not insert data in this way... the simplest way I can think of, is to dump data from the source db (with phpmyadmin, for instance) and import it into the target db.
链接地址: http://www.djcxy.com/p/94236.html上一篇: 用mysqldump跳过某些表