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!

default mysql host for new accounts

Discussion in 'Database Discussion' started by backblaze, Oct 13, 2015.

  1. backblaze

    backblaze Member

    Joined:
    May 17, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    51
    where i need to update mysql settings so every new account database user/host will be created with 127.0.0.1?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,585
    Likes Received:
    439
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    All databases created are already: localhost
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. backblaze

    backblaze Member

    Joined:
    May 17, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    51
    did you read the message???
    127.0.0.1 != localhost

    unix socket connection and tcpip address...

    we need it to be 127.0.0.1

    select user,host from mysql.user;
    +------------------+---------------+
    | user | host |
    +------------------+---------------+
    | test | 127.0.0.1
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    Could you provide some more details about the specific error message you are receiving with the default configuration? Have you ensured the database user is added to the database via the "MySQL Databases" option in cPanel?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. backblaze

    backblaze Member

    Joined:
    May 17, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    51
    my question is pretty simple, not sure why you can not answer...
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,442
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    There's no simple configuration value you can change for this setting. Thus, we are simply attempting to understand the issue and offer an alternative solution before advising you to utilize hook action scripts. That being said, if you simply want an answer to the question, then the place to start is at:

    Guide to Standardized Hooks - Software Development Kit - cPanel Documentation

    You will need to develop a custom script that configures MySQL how you prefer, and then utilize a hook to automatically run that script each time an account or database is created.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. backblaze

    backblaze Member

    Joined:
    May 17, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    51
    looks like this is something you have to include in whm, such a simple task to change and i need to dive into development kit? :/
     
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,585
    Likes Received:
    439
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I did.

    Would you mind mentioning the script name you're (I guess) trying to install thats requiring this setting for database to be 127.0.0.1 instead of localhost? localhost should work fine, if it doesn't for your script I'm curious as to which script that is.

    TIA.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. backblaze

    backblaze Member

    Joined:
    May 17, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    51
    hm, 4 messages about nothing... what are you talking about???
    all im asking if there is any way you can add "hostname" field in "database and database user" creation wizard in cPanel.
    so i dont have to use mysql shell every time to check it and convert ....
     
  10. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,585
    Likes Received:
    439
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    No, there isn't.

    What are you talking about, I wonder? Why would you need to change 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