1
所以我想從一個表複製一些記錄到另一個。但訣竅是另一個表在不同的HOST。我會嘗試通過給你一個mysql查詢僞代碼來解釋。MySQL:從另一個主機插入表
Another_host = "192.168.X.X";
INSERT INTO database_original.table_1(id, name, surname)
SELECT id, name, surname
FROM Another_host.database_another.table_2
WHERE Another_host.database_another.table_2.id > 1000;
我可能必須在某處聲明用戶爲「Another_host」。 這就是我想要做的..這甚至可能像我想象的那樣?
THX
我這種情況的典型解決方案是使用一種腳本語言,像PHP。這對你來說是一種選擇嗎? – jlemley