Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

PHP-FPM Can Not Connect to Mysql through LOCALHOST, only 127.0.0.1

Discussion in 'EasyApache' started by Mike Grotton, Feb 17, 2019.

  1. Mike Grotton

    Mike Grotton Registered

    Joined:
    Feb 17, 2019
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Maine
    cPanel Access Level:
    Website Owner
    This issue is affecting PHP-FPM only. If I have it enabled for an account, that account can't connect to databases using 'Localhost', I have to specify '127.0.0.1'

    If I disable PHP-FPM for that account, it is able to connect to DB fine with no further configuration changes.
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,262
    Likes Received:
    480
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Mike Grotton


    That seems odd, what's in the .htaccess for the domain? Also, have you discussed this issue with your provider? It's possible they have some configurations that are preventing this from working as intended.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,920
    Likes Received:
    167
    Trophy Points:
    343
    cPanel Access Level:
    Root Administrator
    What is in /etc/hosts

    It would seem to me that php-fpm is not reading /etc/hosts or there is something misconfigured in /etc/hosts
     
    cPanelLauren likes this.
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,262
    Likes Received:
    480
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    My assumption as well but after looking at the cPanel Access Level for him I believe he would need to go through his provider for assistance with this.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice