MySQL replication between VPS and shared host

MySQLreplication

I have a VPS where I have ssh access and shared host with CPanel. Both have MySQL.

I need to create a master/slave setup among the two server.
As per this tutorial: How To Set Up Database Replication In MySQL, I will need to modify the my.conf file.

Is it possible to achieve this with the following permissions on both the servers?

  • VPS

    I have root access with ssh login where I can modify /etc/my.conf file.

  • Shared host

    Cpanel with phpmyadmin.

Best Answer

if you have MySQL root access on the shared host, there is a change that it works, just make sure that you:

  • Use the VPS as master
  • Enable the shared host ip to connect on vps host
  • run a SELECT @@server_id on shared host and set the vps to use a different one.
  • follow the steps described on tutorial
  • run the CHANGE MASTER TO on SQL tab on PhpMyAdmin