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.

default mysql host for new accounts

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

  1. backblaze

    backblaze Member

    Joined:
    May 17, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    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:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    All databases created are already: localhost
     
  3. backblaze

    backblaze Member

    Joined:
    May 17, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  5. backblaze

    backblaze Member

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

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  7. backblaze

    backblaze Member

    Joined:
    May 17, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    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:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    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.
     
  9. backblaze

    backblaze Member

    Joined:
    May 17, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    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:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    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?
     
Loading...

Share This Page