1

Topic: How with the data from one server MySql to fill the table on other MySql-server? - C#

Misters , hello!
Help to understand - as with the data from one server MySql to fill the table on other MySql-server...
I obtain the data so:
MySqlLib.MySqlData.MySqlExecuteData.MyResultData result = new MySqlLib.MySqlData.MySqlExecuteData.MyResultData ();
result = MySqlLib.MySqlData.MySqlExecuteData.SqlReturnDataset ("SELECT *"
+ "FROM detectors_detections"
+ "WHERE detectors_detections.id> 14557217", "database = ****; Data source = *****; UserId = ****; Password = ****");
if (result. HasError == false)
{
dataGridView1.Columns. Clear ();
dataGridView1.DataSource = result. ResultData. DefaultView;
MessageBox. Show (result. ResultData. Rows. Count. ToString ());
}
else
{
MessageBox. Show (result. ErrorText);
}

2

Re: How with the data from one server MySql to fill the table on other MySql-server? - C#

mda-a-a... Kind people were similar translated in Russia... smile all come look and leave... Really nobody faced the similar?!

3

Re: How with the data from one server MySql to fill the table on other MySql-server? - C#

Vladimir2114;
Simply to span the data it is possible the utility mysqldump
If  that is necessary through C# full examples in Google:
http://www.c-sharpcorner.com/UploadFile … g-C-Sharp/
https://stackoverflow.com/questions/161 … parameters
public string CreateEntry (string Connectionstring, string mitarbeiter)
{
connection = new MySqlConnection (Connectionstring);
try
{
var command = connection. CreateCommand ();
command. CommandText = "INSERT INTO tb_mitarbeiter (Vorname) VALUES (' tom ')";
connection. Open ();
return "Mitarbeiter wurde angelegt";
}
catch (Exception ex)
{
return ex. Message;
}
finally
{
connection. Close ();
}
}

4

Re: How with the data from one server MySql to fill the table on other MySql-server? - C#

Thanks, of course, but you offer all examples or on one server, or simply to fill with values... And it is necessary for me the data from OTHER server... (And such as your examples - really heap, is also faster...)

5

Re: How with the data from one server MySql to fill the table on other MySql-server? - C#

And not simply to span... The data  on the head server all day and night and me it is necessary to update the server (to add the data with head - not all successively, and samplings)

6

Re: How with the data from one server MySql to fill the table on other MySql-server? - C#

Vladimir2114 wrote:

Thanks, of course, but you offer all examples or on one server, or simply to fill with values... And it is necessary for me the data from OTHER server... (And such as your examples - really heap, is also faster...)

The difference between local and exterior - only to specify IP (if on TCP to the protocol).
I.e. instead of localhost specify 123.123.123.123 (or the name if is )
And port (if not 3306).... Well and  it is necessary that the port has been opened and listened.

7

Re: How with the data from one server MySql to fill the table on other MySql-server? - C#

It agree... And then as these given to save the local! (In it actually the initial question also consisted...)

8

Re: How with the data from one server MySql to fill the table on other MySql-server? - C#

Vladimir2114 wrote:

it agree... And then as these given to save the local! (In it actually the initial question also consisted...)

...Well pull out the data on one line from result or from result. ResultData
For  , I hope, is certain ... Record-for-record.
, got fields and we create 
...Then we send on  the server
Well type:
cmd. CommandText = "INSERT INTO room (person, address) VALUES (? person? address)";
cmd. Parameters. Add ("? person", MySqlDbType. VarChar).Value = "myname";
cmd. Parameters. Add ("? address", MySqlDbType. VarChar).Value = "myaddress";
cmd. ExecuteNonQuery ();
( from other library... You look at what libraries is at you)

9

Re: How with the data from one server MySql to fill the table on other MySql-server? - C#

Vladimir2114;
If servers have communication among themselves see FEDERATED Storage Engine .

10

Re: How with the data from one server MySql to fill the table on other MySql-server? - C#

Vladimir2114 ;
Be defined, what exactly you want.
1. To take away the data from one server on the client and to give to another
Or
2.
To force one server to give (or to take away) given to other server, and the client only controls (or initiates) this process

11

Re: How with the data from one server MySql to fill the table on other MySql-server? - C#

javajdbc, approximately to it also I come...
No, servers are not connected with each other
Something is not clear? Any method to take away (permanently) the data with remote and to update tables on the local server (about federated I know - the remote does not approach I administer not)

12

Re: How with the data from one server MySql to fill the table on other MySql-server? - C#

Vladimir2114 wrote:

any method to take away (permanently) the data with remote and to update tables on the local server

In that case you explicitly not in that forum addressed. From MySQL you want to obtain absolutely standardly the data and it is so standard to flood them. And it is necessary to search for optimization in  - and accordingly to address in a forum on .
Unique stipulation which can affect a deal are words "the local server". At you the server of assignment and the client who will obtain given are same  OS?

13

Re: How with the data from one server MySql to fill the table on other MySql-server? - C#

Certainly same... i-i-i? To tell the truth did not understand ... (Forgive - simply I try to learn... And - in any way...))