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.

Setup Separate Web and DB server

Discussion in 'General Discussion' started by ChrisRHS, Dec 8, 2008.

  1. ChrisRHS

    ChrisRHS Well-Known Member

    Joined:
    Jul 12, 2006
    Messages:
    292
    Likes Received:
    5
    Trophy Points:
    18
    Hello all,

    I am in the midst of setting up a separate web server (with cpanel installed on it) and mysql server. I am having issues getting WHM to connect to the separated SQL box, what exactly do I need to have installed on the SQL server for WHM to be able to install and connect to it?

    Thanks
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The cPanel/WHM server must be able to connect to the MySQL server by means of SSH. Be sure to verify this by SSHing to your cPanel/WHM machine then from that machine, SSH to the MySQL server. Connecting via SSH from your workstation directly to the MySQL server does not prove that the cPanel/WHM server can connect to the MySQL server.

    Additionally, MySQL and Perl must already be installed on that server.
     
  3. ChrisRHS

    ChrisRHS Well-Known Member

    Joined:
    Jul 12, 2006
    Messages:
    292
    Likes Received:
    5
    Trophy Points:
    18
    Thank you, I've managed to get some dependencies figured out, and now I am receiving this error:

    Code:
        root      6609  0.1  0.0  65904  1368 ?        S    22:01   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid
        mysql     6675  0.2  0.3 222952 27552 ?        S
    
    Done
    Testing new mysql setup...Failed to connect to the remote mysql host:
    
    /usr/bin/mysqladmin: connect to server at '192.168.0.2  ' failed
    error: 'Lost connection to MySQL server at 'reading initial communication packet', system error: 113'
    
     
  4. ChrisRHS

    ChrisRHS Well-Known Member

    Joined:
    Jul 12, 2006
    Messages:
    292
    Likes Received:
    5
    Trophy Points:
    18
    Ok, just an update, I have everything setup now, and it seems to be working (there was an issue with eth: connection to the db), however, I do a couple of small problems / questions. First off, I've had to disable automatic updates, as it seems this breaks the connection for the separate DB server, and the only way to get it back, is to redo the connection. I also have a question with regards to the status monitoring, which MySQL is actually being monitored, as it seems that MySQL is still running on the cPanel installed box, as well as the separated DB server. The third question is, RoundCube reports a db connection error when trying to access it, the other two, do not. Is this a know problem?

    cPanel 11.24.2-C32283 - WHM 11.24.2 - X 3.9
    CENTOS 5.2 x86_64 on standard
     
Loading...

Share This Page