CustomBuild cannot connect to MySQL even with correct credentials

mathgeek

Verified User
Joined
Feb 4, 2020
Messages
11
I am trying to run custombuild to rebuild my roundcube.
I have already edited my password in mysql config files in the following addresses:

/usr/local/directadmin/conf/mysql.conf
/usr/local/directadmin/conf/my.cnf

Both files show the correct password for da_admin. I even reset my password for da_admin in MySQL again. But still when I want to rebuild roundcube, it says that it cannot access 'da_admin'@'localhost'. Here's the error:

/usr/bin/mysqlshow: Access denied for user 'da_admin'@'localhost' (using password: YES)

I have no idea why it gives that error. PhpMyAdmin works fine. So, it seems certain that my MySQL config files are correct but still roundcube cannot access `da_admin`@`localhost` with the password given in those two config files.
 
I even reset my password for da_admin in MySQL again.
Like this?

Did you also tried to connect yourself manually to mysql with the password? Like:
Code:
mysql -u da_admin -p

Other option could be that localhost access for da_admin is not present anymore in the database. However, that would be odd.
You could check as root user. Password for mysql root (if not changed) is in /usr/local/directadmin/scripts/setup.txt under mysql= setting.
The old da_admin pass will be there too.
 
Like this?

Did you also tried to connect yourself manually to mysql with the password? Like:
Code:
mysql -u da_admin -p

Other option could be that localhost access for da_admin is not present anymore in the database. However, that would be odd.
You could check as root user. Password for mysql root (if not changed) is in /usr/local/directadmin/scripts/setup.txt under mysql= setting.
The old da_admin pass will be there too.
Thank you for your reply.

Yes, I reset my password exactly like that post. In fact, I had already seen that post after Googling the issue.

Also, I can successfully connect to MySQL through command line with the new password. It works flawlessly. It also works when I try to connect to MySQL using the new password for da_admin via PhpMyAdmin. Meanwhile, da_admin has full privileges.

I think the issue is with my setup.txt file. Does Direct Admin actually use this file? If yes, here is what it contains:

hostname=***
email=***
mysql=B6l-4***
mysqluser=da_admin
adminname=admin
adminpass=***@***
ns1=***
ns2=***
ip=***.***.***.***
netmask=***.***.***.***
uid=***
lid=***
services=services_es**_**.tar.gz

I have obviously tried to hide personal information. I think my MySQL password is missing. Isn't it?

Also, I restarted mysqld just in case. Nothing changed. :(
 
Last edited:
As far as I know, Directadmin does not use the setup.txt file, it's only a reference for the admin after installation which info is used.

I think my MySQL password is missing. Isn't it?
No it's not. That should be in /usr/local/directadmin/conf/my.cnf and mysql.conf

If you got the correct one in those files, things should work.

I presume you don't have any custom stuff? In this directory?
/usr/local/directadamin/custombuild/custom/roundcube

You might try to rebuild it completely, like this, but content may be lost so make a backup:
Code:
rm -rf /var/www/html/roundcube
mysql --defaults-file=/usr/local/directadmin/conf/my.cnf -e "DROP DATABASE da_roundcube"
cd /usr/local/directadmin/custombuild
./build update
./build roundcube
 
As far as I know, Directadmin does not use the setup.txt file, it's only a reference for the admin after installation which info is used.


No it's not. That should be in /usr/local/directadmin/conf/my.cnf and mysql.conf

If you got the correct one in those files, things should work.

I presume you don't have any custom stuff? In this directory?
/usr/local/directadamin/custombuild/custom/roundcube

You might try to rebuild it completely, like this, but content may be lost so make a backup:
Code:
rm -rf /var/www/html/roundcube
mysql --defaults-file=/usr/local/directadmin/conf/my.cnf -e "DROP DATABASE da_roundcube"
cd /usr/local/directadmin/custombuild
./build update
./build roundcube
Nope. That didn't work either.
I even removed roundcube from my Direct Admin panel, besides removing it manually as you said, and still when I tried to reinstall it, it gave me the same error.
Maybe it's a bug with the latest version of roundcube in custombuild? All other applications work fine. PhpMyAdmin works fine, SquirrelMail works fine, only roundcube doesn't work.
 
Try youds tip. If that doesn't help. Check if the credentials in Roundcube's config.ing.php are even working with mysql.
Otherwise I guess you have to send in a ticket if you're not on a personal license.
 
Back
Top