Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    BANNED
    Join Date
    Jan 2005
    Posts
    49

    Default Why is mysql asking for a password?

    Why is mysql asking for a password?
    [root@mysql300 tmp]# mysqladmin processlist
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'
    [root@mysql300 tmp]# mysqladmin processlist
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'
    [root@mysql300 tmp]# mysqladmin processlist
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'

    This same command works fine on my other servers:
    root@server101 [/usr/local]# mysqladmin processlist
    +----------+-----------+-----------+-----------+---------+------+-------+------------------+
    | Id | User | Host | db | Command | Time | State | Info |
    +----------+-----------+-----------+-----------+---------+------+-------+------------------+
    | 11310310 | eximstats | localhost | eximstats | Sleep | 20 | | |
    | 11615704 | root | localhost | | Query | 0 | | show processlist |
    +----------+-----------+-----------+-----------+---------+------+-------+------------------+

  2. #2
    Member
    Join Date
    Sep 2004
    Location
    Cleveland, Ohio
    Posts
    378

    Default

    edit /root/.my.cnf with your root MySQL password. You can also set it in WHM.

  3. #3
    Member ntwaddel's Avatar
    Join Date
    Nov 2003
    Location
    Templeton, CA
    Posts
    173

    Default

    i dont think you want to store your mysql root pass in any files. just do mysqladmin -u root -p and enter the password

  4. #4
    BANNED
    Join Date
    Jan 2005
    Posts
    49

    Default

    Quote Originally Posted by Blue|Fusion
    edit /root/.my.cnf with your root MySQL password. You can also set it in WHM.
    What is the syntax for this?

  5. #5
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    If you really really want to have that password in plain sight....

    the syntax is:

    [client]
    user="root"
    password="password"
    Regards,
    David
    Forum Moderator

  6. #6
    Member
    Join Date
    Dec 2001
    Posts
    1,558

    Default

    Guys, the /root/.my.cnf is / should only be readable by root user itself. I fail to see why this worries you ? Or how that == plain sight ?

    jailshell-2.05b$ cat /root/.my.cnf
    cat: /root/.my.cnf: No such file or directory

    bash-2.05b$ cat /root/.my.cnf
    cat: /root/.my.cnf: Permission denied
    Beau Henderson

  7. #7
    Moderator cPanel Partner NOC Badge dgbaker's Avatar
    Join Date
    Sep 2002
    Location
    Toronto, Ontario Canada
    Posts
    2,773

    Default

    Because it is a bad practice to do period. Ask any legitimate security expert and they will tell you to never ever have a password in plain text anywhere especially on a public facing server.
    Regards,
    David
    Forum Moderator

  8. #8
    Member
    Join Date
    Dec 2001
    Posts
    1,558

    Default

    And so I assume you don't use and advise not to use mysql on your cpanel servers ? Or you manually set up databases for each client that requests them of you ?
    Beau Henderson

  9. #9
    Member
    Join Date
    Jan 2005
    Location
    Kolkata, India
    Posts
    15

    Default

    what to od in my.cnf

Similar Threads & Tags
Similar threads

  1. mySQL Fails after mySQL Password Reset
    By eglwolf in forum cPanel and WHM Discussions
    Replies: 15
    Last Post: 03-28-2011, 06:15 PM
  2. Replies: 0
    Last Post: 01-18-2011, 10:08 AM
  3. Remote MySQL Password Error when password is correct
    By barkermn01 in forum New User Questions
    Replies: 1
    Last Post: 09-01-2010, 11:10 AM
  4. Changing a Cpanel password changes the MySQL password...
    By driverC in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 10-15-2007, 08:33 AM
  5. Changing user password changes mysql password
    By shacker23 in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-16-2005, 02:07 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube