Skip to main content

Remote mysql server

Comments

9 comments

  • cPanelMichael
    Hello :) You will have to backup and restore the databases manually to the remote MySQL server, as that's not a transfer process facilitated by the cPanel software. The "mysqldump" utility will allow you to backup the databases: MySQLDump Thank you.
    0
  • bettinz
    Thank you, I've tried with a test server, and it works. But an old account still load the database from localhost, instead load the db from remote server: how can I tell cPanel to use remote server for account's database, and not local db? Thank you :) For reference, i've found that useful post:
    0
  • cPanelMichael
    Have you setup the remote MySQL server option in Web Host Manager? It's located at: "WHM Home " SQL Services " Setup Remote MySQL Server" Thank you.
    0
  • bettinz
    Yes, I've setup the remote DB, in fact I don't see localhost anymore, but I see the mysql server's IP. Now the situation is: - I've about 100 sites and accounts on localhost db and server - I've moved one site DB with scp to remote server - I've stopped mysql on remote server, the site work. - I've renamed the /var/lib/mysql folder with account name on localhost. The site not work anymore. It's nice if I can select which account to move, and move the accounts between server like zones with DNS Only.
    0
  • cPanelMichael
    Please ensure you have followed all of the steps listed at: Setup Remote MySQL Server Also, if the issue continues, try updating the configuration files for your scripts to use the IP/Hostname of the remote MySQL server instead of "localhost". Thank you.
    0
  • bettinz
    Thank you, I've done everything, in fact I see the cPanel services using the remote db. What I've learned is that I don't need to edit my customers script and change server to remote ip. Can you confirm that? Thank you
    0
  • cPanelMichael
    To clarify, are your websites with databases now functioning normally? If not, try updating the database configuration file on one particular website that is not functioning to see if that helps. Thank you.
    0
  • bettinz
    Yes, they are working perfectly with localhost. But they use local db. I have see that because if I have an account called "test", and I move /var/lib/mysql/test from local server to remote server, the site stop works. In a normal situation, and if remote server concept is to use a remote server, if I move the db for the account from local server to remote server, it use remote db. I can't change configuration files for over 100 accounts, maybe I start with a brand new server.
    0
  • cPanelMichael
    It does not sound like you setup the remote MySQL feature correctly if the local MySQL server is still utilized. Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome. Thank you.
    0

Please sign in to leave a comment.