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.

Remote Mysql

Discussion in 'Workarounds and Optimization' started by manan, Oct 24, 2010.

  1. manan

    manan Active Member

    Joined:
    Jun 8, 2006
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I have just installed and configured a remote mysql server on a separate server with mysql disabled on the local server. What options should i use in the apache recompile now on the local server.
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hi manan,

    Have you already setup the Remote MySQL through WHM to connect to that machine? I'm not certain you would need to change anything in EasyApache for the setup. The only thing I can think is that you would likely want to change "Update Preferences" area in WHM to have for mysql "Never" rather than "Inherit" since you won't be running MySQL locally.

    Thanks.
     
  3. manan

    manan Active Member

    Joined:
    Jun 8, 2006
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Thanks for the reply. It is connected to the remote mysql but in phpinfo it shows the mysql of the local system and not the remote one, how would i change that to compile against the mysql of remote system or do i need to change some settings in the php of the local server so that it shows the remote configuration. Should i keep the option for mysql selected in recompile or remove them.
     
    #3 manan, Oct 24, 2010
    Last edited: Oct 24, 2010
  4. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    I'm guessing you're getting the idea that PHP is configured for the local server when you read the MYSQL_SOCKET value in the phpinfo. This however is irrelevant as when you connect to MySQL using your PHP scripts you must specify the address of the server you're connecting to. Since in your case the server is not local (e.g. not localhost), you must explicity pass the IP/hostname of the remote box. So as long as the remote MySQL server has been configured for access from your primary webserver box (as Tristan mentioned), then everything will work just fine.
     
Loading...

Share This Page