MYSQL root user is being denied permission while installing an app

Hello,
The system is using the password stored in /etc/yunohost/mysql. You can check if it works or not by typing

mysql -u root -p$(cat /etc/yunohost/mysql) mysql

I guess you will have “ERROR 1045 (28000)” again, so just to be sure you can set back its password as follows (logged in as root):

service mysql stop
mysqld --skip-grant-tables

In another shell (still as root):

cat /etc/yunohost/mysql
(copy somewhere the password)
mysql mysql
mysql> set password for 'root'@'localhost' =  PASSWORD('thepassword');
mysql> set password for 'root'@'::1' =  PASSWORD('thepassword');
mysql> set password for 'root'@'127.0.0.1' =  PASSWORD('thepassword');
mysql> exit
ps ax | grep mysql
kill THE_TWO_PIDS_FOR_MYSQLD_SAFE
service mysql start

This page may also help: https://wiki.labriqueinter.net/doku.php/howto:fix_self_corrupt_mysql

Martin

2 Likes