Beginner question about MySQL-database (error connecting) in my_webapp

Hi everyone,

First off, let me say I love YunoHost! Have been running it on an old Raspberry Pi for quite some years and have learned some harsh beginner admin lessons and have had a lot of fun with Nextcloud, Gitea, Backdrop and more.

I have two very simple questions, that might be too basic to be considered, but I could not find an answer in the documentation, this forum, or elsewhere.

Because these questions are so basic, I did not think I needed to provide details on my setup (will be happy to provide these of course if they are helpful here). Here are my questions:

  • The documentation (my_webapp_ynh/README.md at testing · YunoHost-Apps/my_webapp_ynh · GitHub) mentions that when you select to install the MySQL-database (which I did) the connection details will be stored in the file db_access.txt in the root directory. But I don’t seem to have this file, not in /var/www/my_webapp nor elsewhere.

  • I cannot seem to log in to the MySQL-database, for example the command below returns “ERROR 1045 (28000): Access denied for user ‘my_webapp’@‘localhost’ (using password: YES)”

mysql --host=localhost --user=my_webapp --password=[the password that the after installation popup provides] my_webapp

What could I be doing wrong? Thanks in advance!

Mmmh it looks like this file was removed without updating the documentation… sorry! Normally a banner should have been displayed in the webadmin with those credentials. (reading further down your message, you did saw it :slight_smile: )

Otherwise to display it: yunohost app setting my_webapp db_pwd

I can replicate your issue, and it is definitely not normal.

Thanks so much for your response!

Ah, so the banner displays the same information that db_access.txt would contain, so that’s fine the way it is now.

Regarding the login, it’s good to hear you can replicate the issue, as I though I was going insane XD Curious to know what it would be, eventually.

Hello, I bump this topic in order to avoid its locking, as i have the same problem (see https://forum.yunohost.org/t/database-access-denied-on-custom-webapp-after-migration/). @tituspijean Did you have the time to see what the problem could be? Thanks a lot!

@j8ter If your problem is not already resolved: see the db_pwd or mysqlpwd line in /etc/yunohost/apps/my_webapp/settings.yml (my_webapp with any number if it’s not the first), and compare to the one the banner gave you. Maybe there is an inconsistency here.

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