SQL password changed

My YunoHost server

Hardware: VPS bought online
YunoHost version: x.x.x
I have access to my server : Through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : yes
If yes, please explain: Modified the password for the root user on MySQL

Hi everyone. Recently i had to change the MySQL root password on my Yunohost server, but now every time I do a backup or at certain app upgrades, Yunohost shows error like “Warning: mysqldump: Got error: 1045: “Access denied for user ‘root’@‘localhost’ (using password: NO)” when trying to connect”.

I suppose that Yunohost stores the Mysql root password in some file, but I don´t found it. Any idea? Thanks.

Hello, and welcome!

Why? :fearful:

The file may be /etc/yunohost/psql, but its name seems to refer to PostgreSQL, you may have a /etc/yunohost/mysql file in your system.

Nope, neither /etc/yunohost/mysql or psql exists on my server.

I had to change the password for precaution cause I saw some strange entries on the access log :sweat_smile:

Per No need for mysql root password by alexAubin · Pull Request #912 · YunoHost/yunohost · GitHub, root does not have a password anymore and use a socket since 4.2.0… but maybe by “changing” the password you broke the socket connection?

I’ll let actual experts answer.

Meanwhile, please share actual, full, comprehensive logs of your backup and upgrade attempts.

1 Like

Hi, @tituspijean, here you have:

Sorry for the delay, job duties keep me away for the server the last month…
I don’t really need that DB backup it does, I have cron jobs that dumps the entire db to an backup server every week, so maybe if the solution goes throught disabling that system, I could go on.

Hi again. Solved modifiyng the mysql helper file on /usr/share/yunohost/helpers.d/mysql, editing the mysqldump sentence to “mysqldump -u root -p […]”. Now it asks for the password every time it needs it.

I don´t know if this error is expected due to the MySql password change, but the fact that a SQL dump is required to upgrade certain apps is a big stone on the way, a stone that could be dangerous. I had about two months of updates stopped due to this issue, if I were able to disable the mandatory backup on upgrade, I could at least have the server up to date.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.