centos 5.x - mysql access on localhost denied

Discussion in 'Server Operation' started by nzimas, Mar 25, 2012.

  1. nzimas

    nzimas New Member

    This is a bit of a weird issue.
    I can access the server from remote locations, but not from inside the server itself.

    That is to say:
    mysql -h hostname.tld -uroot -pWhatever
    allows me to log in to the admi console if I do so from any remote machine.

    However, if i mysql -uroot -pWhatever
    from within the server, it gives me the following error message:
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    I have granted the root user with access privileges from everywhere:
    GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY 'Whatever';
    FLUSH PRIVILEGES;

    To make matters worse, /etc/my.cnf doesn't specify anythung relevant.

    So, in a nutshell, I am locked out inside :(
     
  2. falko

    falko Super Moderator

Share This Page