How to transfer table data from my Mysql Db to an external Db running on a different server

168
June 26, 2017, at 9:40 PM

I'm a newcomer and I was wondering how to create a php script to move data from a table in my Mysql DB running on the Server 1 to another table in a second DB on the server 2. Actually I should transfer those data to a CRM. The script should work automatically (I think I could use a cron job to do that).

Any suggestion?

thanks in advance

READ ALSO
Increasing speed of subquery sql statement (mysql) [duplicate]

Increasing speed of subquery sql statement (mysql) [duplicate]

This question already has an answer here:

272
While and For in CSV import by column name

While and For in CSV import by column name

I have a script where I upload a CSV file, it reads the column names and the value inthe column at a specific rowthis is because I want to add them like

147
How to prevent getting back a value I just stored

How to prevent getting back a value I just stored

I am writing an audit platform and I can see myself falling into the same trap I usually do

165
1452 Cannot add or update a child row: a foreign key constraint fails

1452 Cannot add or update a child row: a foreign key constraint fails

I get this error when creating a new productThis is the function:

217