0

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)
1
  • Are you doing this from a programming language? It should be able to open multiple connections to different servers. Commented Dec 8, 2016 at 9:25

4 Answers 4

2

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.

Sign up to request clarification or add additional context in comments.

Comments

1

Simply Use Generate Script Feature of the SQL server :

Follow Link

1 Comment

Mysql is given in the tags. So SQL server will probably not work.
1

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.

Comments

0

Thank you for all the answers. I've answered my question by installing a trial version of navicat and export to excel then import to another db server. Thank you again guys!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.