Is it possible to INSERT query to another db server?
Current Db server: 192.168.59.2
Example:
Insert into 192.168.1.1.Testing.Student (id) values (1)
Is it possible to INSERT query to another db server?
Current Db server: 192.168.59.2
Example:
Insert into 192.168.1.1.Testing.Student (id) values (1)
Looks like you need to use MySQL The FEDERATED Storage Engine. Per documentation
The FEDERATED storage engine lets you access data from a remote MySQL database without using replication or cluster technology. Querying a local FEDERATED table automatically pulls the data from the remote (federated) tables. No data is stored on the local tables.
It kind a similar concept like Linked Server in Microsoft SQL Server.
Simply Use Generate Script Feature of the SQL server :
I'm afraid you can't do something like that. Maybe you should look into FEDERATED tables, where you can copy values to a table from one server to another.
You could have something like this on the table, which you're trying to map:
CREATE TABLE federated_table (
id INT(20) NOT NULL AUTO_INCREMENT,
name VARCHAR(32) NOT NULL DEFAULT '',
PRIMARY KEY (id)
)
ENGINE=FEDERATED
DEFAULT CHARSET=latin1
CONNECTION='mysql://user@your_host:3306/federated/test_table';
This thread might help you.