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

This issue came in once i had activated Google Authenticator for Direct admin and ssh . I am still unable to resolve. Any help :(
 
Very strange and stunned, i was unable to resolve the issue. Removed roundcube and installed Rainloop and its working fine. Thank you for the ones who tried to help me.
 
Still odd that Roundcube has this error, also with another user on this forum. So if somebody would find a solution I would still be curious as this should not happen with only Roundcube.
 
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.

The error message states it is your MySQL credentials preventing this from installing correctly. See below.

Please see https://help.directadmin.com/item.php?id=45 and make sure
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]#

The error message states your MySQL credentials are incorrect. So update them with the values found in the below
Code:
/user/local/directadmin/conf/my.cnf
Use https://help.directadmin.com/item.php?id=45 for how to do that.

The bit in the output below is what draws attention:
Code:
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)

This should fix it for you. I assume DirectAdmin’s CustomBuild is using my.cnf, if after updating to the right password you are still having problems come back and I’m sure someone will be able to help.

Kind regards
 
Back
Top