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.

mysql root password

Discussion in 'General Discussion' started by olivier222333, Feb 26, 2005.

  1. olivier222333

    olivier222333 Well-Known Member
    PartnerNOC

    Joined:
    Jul 12, 2004
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    hi
    I have changed the mysql root password in whm
    but my customers can connect using root and blank password mtysql...
    I dont understand why...
    I think whm reset the mysql root password to blank...

    have you ever had this problem?
     
  2. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    hmm.. users other than root shouldn't be able to do that, how are they accessing mysql, php scripts or via command line?

    What does

    # cat /root/.my.cnf

    reveal?


    To reset the password via command line

    # mysql mysql

    > UPDATE user SET Password = PASSWORD('Your_new_mysql_root_password') WHERE User = 'root';

    > FLUSH PRIVILEGES;

    > quit

    Make sure to add the new mysql root pass into /root/.my.cnf
     
  3. olivier222333

    olivier222333 Well-Known Member
    PartnerNOC

    Joined:
    Jul 12, 2004
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    I havent aded the pass:

    [mysqld]
    max_user_connections = 20
    set-variable = max_connections=300
    safe-show-database
    log-slow-queries = /var/log/mysql/slow-query.log
    skip-networking
    log = /var/log/mysql/mysql.log
    log-error = /var/log/mysql/mysql.err


    may be the cause....

    can you show me how to put it here?

    thx
     
  4. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    The configuration that you posted is from /etc/my.cnf

    Check

    /root/.my.cnf

    for your mysql root password and then update it with the new password if you reset it manually via mysql shell

    Type

    # mysql mysql

    > UPDATE user SET Password = PASSWORD('Your_new_mysql_root_password') WHERE User = 'root';

    > FLUSH PRIVILEGES;

    > quit

    If you want to reset the password for mysql via command line.
     
  5. olivier222333

    olivier222333 Well-Known Member
    PartnerNOC

    Joined:
    Jul 12, 2004
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    ok thanks
    but what must I put in /root/.my.cnf ?
     
  6. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    What do you currently have in there? It should look like this,

    Code:
    [client]
    user="root"
    pass="your_mysql_root_password"
     
Loading...

Share This Page