The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mysql server to another server.

Discussion in 'Database Discussions' started by sreeninair, Feb 16, 2014.

  1. sreeninair

    sreeninair Well-Known Member

    Joined:
    Dec 23, 2013
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello Guys,

    I have a server which is having high load. So I am planning to purchase another serer and use it as my mysql server. Please let me know the procedure.

    Thanks
    Sreeni
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    649
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  4. sreeninair

    sreeninair Well-Known Member

    Joined:
    Dec 23, 2013
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello Guys,

    I have configured it successfully. But no database were copied over to remote server. Do I have to manually copy databases to remote server?? . If so let me know the exact steps.

    Thanks
    Sreeni
     
  5. sreeninair

    sreeninair Well-Known Member

    Joined:
    Dec 23, 2013
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello Guys,

    I have now rsynced mysql data directory and restarted mysql. The main server is using remote mysql and it is showing in remote mysql server section in whm. Still Mysql is consuming load from main server. The remote server mysql process is very low. Please help me on this.

    mysql process on main server
    4204 mysql 15 0 208m 34m 4256 S 302.4 0.2 1:51.72 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=my

    mysql process on old server:
    10348 mysql 20 0 497m 26m 5788 S 0.0 0.1 0:00.24 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --

    Thanks
    Sreeni
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    649
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  7. sreeninair

    sreeninair Well-Known Member

    Joined:
    Dec 23, 2013
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello Michael,

    The load details are pasted below. The mysql is taking the load. How can I confirm mysql is running remotely. Here if I stop mysql in main server the sites will go down.

    top - 03:47:59 up 203 days, 15:07, 2 users, load average: 2.87, 2.99, 3.10

    Thanks
    Sreeni
     
  8. sreeninair

    sreeninair Well-Known Member

    Joined:
    Dec 23, 2013
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello,

    The main issue is when I stop mysql in main server the sites will show database connection error.

    Thanks
    SReeni
     
  9. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    you have to change your connection strings for all of your scripts to use the remote mysql server
     
  10. sreeninair

    sreeninair Well-Known Member

    Joined:
    Dec 23, 2013
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello Dalem,

    How is this possible?. I have thousands of accounts in the serer. Is their any way other than this ?

    Thanks
    Sreeni

    - - - Updated - - -

    Hello Dalem,

    How is this possible?. I have thousands of accounts in the serer. Is their any way other than this ?

    Thanks
    Sreeni
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    649
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You can actually leave your script configuration values in-place. When you setup the remote MySQL server option in WHM, it ensures that MySQL connection attempts to localhost are automatically routed to the remote MySQL server. You should not uninstall MySQL completely from the local machine.

    Thank you.
     
  12. sreeninair

    sreeninair Well-Known Member

    Joined:
    Dec 23, 2013
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello Michael,

    But when I stop mysql in main server sites will go down.

    Thanks
    Sreeni
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    649
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It's normal to see an active MySQL process when using a remote MySQL server. It should show the hostname of the remote MySQL server. However, 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.
     
Loading...

Share This Page