Mysql – Move Oracle data to and from MySQL with the help of PHP

MySQLoraclePHP

My application is in PHP which by default uses MySQL db. I have connected MySQL & Oracle dbs with PHP.

Now I want to move data from Oracle db into Mysql db through PHP. Is it possible to do? Is it necessary for me to somehow sync between the two databases as we need to have our backup on the Oracle db.

How do I do this with the help of PHP?

Best Answer

How about if you export your data to an external script file using MySQL dump (you have the options of exporting only the data and not the sturcture), which can be done through PHP and you run another PHP script of load the data into Oracle using straight PHP or an oracle client.

Instead of using MySQL dump you can also generate an SQL file which contains the records which have changed

You can also schedule the jobs using Cron but the import into Oracle job should happen some time, maybe an hour or two depending on the time it takes to generate the dump file.