Need urgent help with Unable to connect to the database (Roundcube) (Centos 7) (Direct admin) (Linux)

mzsol

New member
Joined
Aug 26, 2020
Messages
15
Need urgent help with Unable to connect to the database (Roundcube) (Centos 7) (Direct admin) (Linux). Screenshot attached. Tried many stuff but still its not working, SquirrelMail is working fine.
 

Attachments

  • Screenshot 2020-08-26 at 1.24.20 PM.png
    Screenshot 2020-08-26 at 1.24.20 PM.png
    27.3 KB · Views: 26
There's not much to go on here. Look at the Roundcube config file (likely /var/www/html/roundcube/config/config.inc.php) and find the database credentials. Test them manually from the command line to see if they work. If not, the Roundcube MySQL user might not exist in your database, and you'll need to create it. Or, the password could've been changed, in which case you must update the config.inc.php file.
 
I would reinstall Roundcube and look for errors during the install.
 
I would reinstall Roundcube and look for errors during the install.

When i try to do this:

cd /usr/local/directadmin/custombuild/
./build roundcube

It shows an error
---------------------------------------------------------------------------------------------
[ro-------------as custombuild]# ./build roundcube
/usr/bin/mysqlshow: Access denied for user 'da_admin'@'localhost' (using passwo
rd: YES)
Inserting data to mysql and creating database/user for roundcube...
ERROR 1045 (28000): Access denied for user 'da_admin'@'localhost' (using passwo
rd: YES)
Found MySQL version 5.5
Creating User: CREATE USER 'da_roundcube'@'localhost' IDENTIFIED BY 'kL-----------V
-----------iy';
ERROR 1045 (28000): Access denied for user 'da_admin'@'localhost' (using passwo
rd: YES)
Granting access: GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,LOCK TABLE
S,INDEX,REFERENCES ON da_roundcube.* TO 'da_roundcube'@'localhost';
ERROR 1045 (28000): Access denied for user 'da_admin'@'localhost' (using passwo
rd: YES)
Setting password: SET PASSWORD FOR 'da_roundcube'@'localhost' = PASSWORD('kLulY
GuKxVhPPViy');
ERROR 1045 (28000): Access denied for user 'da_admin'@'localhost' (using passwo
rd: YES)
ERROR 1045 (28000): Access denied for user 'da_roundcube'@'localhost' (using pa
ssword: YES)
Database created, da_roundcube password is kLu-----------Viy
Editing roundcube configuration...
Roundcube 1.4.8 has been installed successfully.
WARNING: Changed defaults (These config options have new default values):
- 'skin'
- 'smtp_port'
- 'smtp_user'
- 'smtp_pass'
- 'jquery_ui_skin_map'
Executing database schema update.
ERROR: SQLSTATE[HY000] [1045] Access denied for user 'da_roundcube'@'localhost'
(using password: YES)
ERROR: Failed to connect to database
[roo-----------as custombuild]#
 
I must mention i am am new to Linux and learnt alot within 30 days. Managing a server. Faced hundreds of issues and resolved by you guys help. This is something unable to resolve so i created a post. Hope so i will be able to resolve. BTW i love the simplicity of direct admin its just wow.
 
There's not much to go on here. Look at the Roundcube config file (likely /var/www/html/roundcube/config/config.inc.php) and find the database credentials. Test them manually from the command line to see if they work. If not, the Roundcube MySQL user might not exist in your database, and you'll need to create it. Or, the password could've been changed, in which case you must update the config.inc.php file.

I am unable to see any database credentials in Roundcube config file (likely /var/www/html/roundcube/config/config.inc.php).
 
I must appreciate everyone replying to me, It will be great if you guys can reply with more details so i can act without any issues.
 
Try this:
Code:
/usr/local/directadmin/custombuild/build clean
/usr/local/directadmin/custombuild/build roundcube

This should solve your problem.
 
Try this:
Code:
/usr/local/directadmin/custombuild/build clean
/usr/local/directadmin/custombuild/build roundcube

This should solve your problem.

Output:
--------------------------------------------------

[ro--------------------------as ~]# cd /usr/local/directadmin/custombuild/
[ro-----------------------as custombuild]# /usr/local/directadmin/custombuild/build clean
[ro-----------------------as custombuild]# /usr/local/directadmin/custombuild/build roundc
ube
/usr/bin/mysqlshow: Access denied for user 'da_admin'@'localhost' (using passwo
rd: YES)
Inserting data to mysql and creating database/user for roundcube...
ERROR 1045 (28000): Access denied for user 'da_admin'@'localhost' (using passwo
rd: YES)
Found MySQL version 5.5
Creating User: CREATE USER 'da_roundcube'@'localhost' IDENTIFIED BY '3-----------------------2U
g';
ERROR 1045 (28000): Access denied for user 'da_admin'@'localhost' (using passwo
rd: YES)
Granting access: GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,LOCK TABLE
S,INDEX,REFERENCES ON da_roundcube.* TO 'da_roundcube'@'localhost';
ERROR 1045 (28000): Access denied for user 'da_admin'@'localhost' (using passwo
rd: YES)
Setting password: SET PASSWORD FOR 'da_roundcube'@'localhost' = PASSWORD('-----------------------
yT-----------------------g');
ERROR 1045 (28000): Access denied for user 'da_admin'@'localhost' (using passwo
rd: YES)
ERROR 1045 (28000): Access denied for user 'da_roundcube'@'localhost' (using pa
ssword: YES)
Database created, da_roundcube password is 3-----------------------g
Editing roundcube configuration...
Roundcube 1.4.8 has been installed successfully.
WARNING: Changed defaults (These config options have new default values):
- 'skin'
- 'smtp_port'
- 'smtp_user'
- 'smtp_pass'
- 'jquery_ui_skin_map'
Executing database schema update.
ERROR: SQLSTATE[HY000] [1045] Access denied for user 'da_roundcube'@'localhost'
(using password: YES)
ERROR: Failed to connect to database
[r-----------------------as custombuild]#
 
Roundcube was working for 1 month and never had this issue. This is a sudden change without even interacting any settings.

Should i try (./build all) ?
 
Looks like logins to MySQL using both da_admin and da_roundcube are failing. If you haven't changed those MySQL passwords, then either someone or something else has, or MySQL is having some problems. Check the MySQL error log if there are any clues there. It should be in /usr/local/mysql/data/ with an .err extension. Rebuilding Roundcube will not resolve this, and I suspect it is not even relevant to the problem you're having, it's just a symptom.
 
If DA is creating databases ok, then it can't be a password issue (for da_admin anyway)? Can you create databases in DA?
 
If DA is creating databases ok, then it can't be a password issue (for da_admin anyway)? Can you create databases in DA?

Yes i am able to create mysql databases in direct admin without any issues. Direct admin admin login is also working fine.
 
Looks like logins to MySQL using both da_admin and da_roundcube are failing. If you haven't changed those MySQL passwords, then either someone or something else has, or MySQL is having some problems. Check the MySQL error log if there are any clues there. It should be in /usr/local/mysql/data/ with an .err extension. Rebuilding Roundcube will not resolve this, and I suspect it is not even relevant to the problem you're having, it's just a symptom.

No one had logged into any of the services. I have installed google authentication for SSH, Direct admin and many other services. My logs are also fine, no suspicious login attempts.

Note: I do had implemented this help after the issue (just for reference) (https://help.directadmin.com/item.php?id=206)

--------------
MySql Log
--------------

15:58:26 mysqld_safe Starting mysqld daemon with databases from /var/li$
200805 15:58:27 [Note] /usr/sbin/mysqld (mysqld 5.5.60-MariaDB) starting as pr$
200805 15:58:28 InnoDB: The InnoDB memory heap is disabled
200805 15:58:28 InnoDB: Mutexes and rw_locks use GCC atomic builtins
200805 15:58:28 InnoDB: Compressed tables use zlib 1.2.7
200805 15:58:28 InnoDB: Using Linux native AIO
200805 15:58:28 InnoDB: Initializing buffer pool, size = 128.0M
200805 15:58:28 InnoDB: Completed initialization of buffer pool
200805 15:58:28 InnoDB: highest supported file format is Barracuda.
200805 15:58:29 InnoDB: Waiting for the background threads to start
200805 15:58:30 Percona XtraDB (http://www.percona.com) 5.5.59-MariaDB-38.11 s$
200805 15:58:30 [Note] Plugin 'FEEDBACK' is disabled.
200805 15:58:30 [Note] Server socket created on IP: '0.0.0.0'.
200805 15:58:30 [Note] Event Scheduler: Loaded 0 events
200805 15:58:30 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.60-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 Ma$
200806 20:03:18 [Note] /usr/sbin/mysqld: Normal shutdown
200806 20:03:18 [Note] Event Scheduler: Purging the queue. 0 events
200806 20:03:18 InnoDB: Starting shutdown...
200806 20:03:23 InnoDB: Shutdown completed; log sequence number 7548851
200806 20:03:23 [Note] /usr/sbin/mysqld: Shutdown complete

00806 22:03:23 mysqld_safe mysqld from pid file /var/lib/mysql/waseemabbas.pk$
200806 22:03:58 mysqld_safe Starting mysqld daemon with databases from /var/li$
200806 22:04:01 [Note] /usr/sbin/mysqld (mysqld 5.5.60-MariaDB) starting as pr$
200806 22:04:02 InnoDB: The InnoDB memory heap is disabled
200806 22:04:02 InnoDB: Mutexes and rw_locks use GCC atomic builtins
200806 22:04:02 InnoDB: Compressed tables use zlib 1.2.7
200806 22:04:02 InnoDB: Using Linux native AIO
200806 22:04:02 InnoDB: Initializing buffer pool, size = 128.0M
200806 22:04:02 InnoDB: Completed initialization of buffer pool
200806 22:04:02 InnoDB: highest supported file format is Barracuda.
200806 22:04:04 InnoDB: Waiting for the background threads to start
200806 22:04:05 Percona XtraDB (http://www.percona.com) 5.5.59-MariaDB-38.11 s$
200806 22:04:05 [Note] Plugin 'FEEDBACK' is disabled.
200806 22:04:05 [Note] Server socket created on IP: '0.0.0.0'.
200806 22:04:05 [Note] Event Scheduler: Loaded 0 events
200806 22:04:05 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.60-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 Ma$
200810 20:17:19 [Note] /usr/sbin/mysqld: Normal shutdown


'5.5.60-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 Ma$
200810 20:17:19 [Note] /usr/sbin/mysqld: Normal shutdown
200810 20:17:19 [Note] Event Scheduler: Purging the queue. 0 events
200810 20:17:19 InnoDB: Starting shutdown...
200810 20:17:20 InnoDB: Waiting for 4 pages to be flushed
200810 20:17:21 InnoDB: Shutdown completed; log sequence number 106953355
200810 20:17:21 [Note] /usr/sbin/mysqld: Shutdown complete


200810 20:17:21 mysqld_safe mysqld from pid file /var/lib/mysql/waseemabbas.pk$
200810 20:19:27 mysqld_safe Starting mysqld daemon with databases from /var/li$
200810 20:19:30 [Note] /usr/sbin/mysqld (mysqld 5.5.60-MariaDB) starting as pr$
200810 20:19:31 InnoDB: The InnoDB memory heap is disabled
200810 20:19:31 InnoDB: Mutexes and rw_locks use GCC atomic builtins
200810 20:19:31 InnoDB: Compressed tables use zlib 1.2.7
200810 20:19:31 InnoDB: Using Linux native AIO
200810 20:19:32 InnoDB: Initializing buffer pool, size = 128.0M
200810 20:19:32 InnoDB: Completed initialization of buffer pool
200810 20:19:32 InnoDB: highest supported file format is Barracuda.
200810 20:19:33 InnoDB: Waiting for the background threads to start
200810 20:19:34 Percona XtraDB (http://www.percona.com) 5.5.59-MariaDB-38.11 s$
200810 20:19:34 [Note] Plugin 'FEEDBACK' is disabled.
 
if your license have support include then just create ticket to let Directadmin Supporter help you directly
 
if your license have support include then just create ticket to let Directadmin Supporter help you directly

When i try to add my license id and client id it says (This is an Internal License on guest login.)

I had purchased a direct admin license from a hosting company. They keep telling me to ask direct admin and direct admin wont allow me to create a ticket. Any suggestions ?
 
then you have no direct support.

the problem is that the logins of the SQL users are not correct, set new passwords and update your config then it will work again...
 
Also with an internal license you should be able to create a ticket as far as I know.
You can go here:
there fill in the credentials in the "You can proceed as a Server Admin" box. It's however no priority support in that case, so it can take a while.
With internal licenses the hosting compamy should provide first support.
 
Also with an internal license you should be able to create a ticket as far as I know.
You can go here:
there fill in the credentials in the "You can proceed as a Server Admin" box. It's however no priority support in that case, so it can take a while.
With internal licenses the hosting compamy should provide first support.

I am unable :(
 

Attachments

  • Screenshot 2020-08-27 at 10.15.24 PM.png
    Screenshot 2020-08-27 at 10.15.24 PM.png
    99.8 KB · Views: 16
then you have no direct support.

the problem is that the logins of the SQL users are not correct, set new passwords and update your config then it will work again...

Appreciate your time, Can you share more details so i can perform, Thank you
 
Back
Top