Im trying to install mysql and I get the error:
mysql_upgrade: Got error: 1045: Access denied for user 'debian-sys-maint'@'localhost' (using password: YES) while connecting to the MySQL server
After some searching, I find this is perhaps giving access to debian-sys-maint, so I did this:
sudo cat /etc/mysql/debian.cnf
Then set the debian password in mysql:
mysql -u root -p <password>
GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'password-here';
Then I restart:
sudo /etc/init.d/mysql restart
And try and configure again:
sudo dpkg --configure -a
I get the same error.
Best Answer
A bit late but here it is: Firstly I'm on
I had to "uncheck" some software repositories. It can be easily done on
Software & Updates
GUI on theOther Software
tab. I unchecked:The only checked repositories for me were:
software&updates window
Then, I solved the problem this way:
If the error(1819) is raised, type this on the mysql terminal
Then restart mysql:
systemctl restart mysql
Finally
to fix broken dependencies
If error continues, enter again to mysql terminal, login: type this:
apt -f install
for the last time.Other way to solve was:
apt -u dist-upgrade