Thursday, August 4, 2016

"ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)" when performing any changes in Plesk or in database directly

Make sure that the admin user has all privileges:
  • Log into MySQL server:
    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin mysql
    
  • Check admin privileges:
    mysql> SHOW GRANTS FOR 'admin'@'localhost'\G
    
  • Grant all privileges toadmin if required:
    GRANT ALL ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
    FLUSH PRIVILEGES;
    1. check/var/log/mysqld.log.
    If you see a message such as:
    [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
    
    this probably means that MySQL was reinstalled or was not upgraded completely. Run the following command to update MySQL:
        MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin