Error in mysql suddenly

xorion

Verified User
Joined
Sep 16, 2016
Messages
12
Can someone help me with this error when I tried to rebuilt mysql on DA and Ubuntu 22?

Mar 26 09:30:35 sg.mydomain.com mysqld[966200]: 2023-03-26 9:30:35 0 [Note] InnoDB: Creating shared tablespace for temporary tables
Mar 26 09:30:35 sg.mydomain.com mysqld[966200]: 2023-03-26 9:30:35 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
Mar 26 09:30:35 sg.mydomain.com mysqld[966200]: 2023-03-26 9:30:35 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Mar 26 09:30:35 sg.mydomain.com mysqld[966200]: 2023-03-26 9:30:35 0 [Note] InnoDB: 10.6.12 started; log sequence number 552059; transaction id 335
Mar 26 09:30:35 sg.mydomain.com mysqld[966200]: 2023-03-26 9:30:35 0 [Note] Plugin 'FEEDBACK' is disabled.
Mar 26 09:30:35 sg.mydomain.com mysqld[966200]: 2023-03-26 9:30:35 0 [ERROR] Failed to initialize plugins.
Mar 26 09:30:35 sg.mydomain.com mysqld[966200]: 2023-03-26 9:30:35 0 [ERROR] Aborting
Mar 26 09:30:35 sg.mydomain.com systemd[1]: mysqld.service: Main process exited, code=exited, status=1/FAILURE
Mar 26 09:30:35 sg.mydomain.com systemd[1]: mysqld.service: Failed with result 'exit-code'.
Mar 26 09:30:35 sg.mydomain.com systemd[1]: Failed to start MySQL database server.

root@sg:/usr/local/directadmin/custombuild# systemctl status mysqld.service
● mysqld.service - MySQL database server
Loaded: loaded (/etc/systemd/system/mysqld.service; enabled; vendor preset: enabled)
Active: activating (start) since Sun 2023-03-26 09:34:05 +08; 4s ago
Process: 966409 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 966411 ExecStartPre=/bin/sh -c [ ! -e /usr/local/mysql/bin/galera_recovery ] && VAR= || VAR=`cd /usr/local/mysql/bin/..; /usr/local/mysql/bin/galera_recovery`; [ $? -eq 0 ] >
Main PID: 966428 (mysqld)
Tasks: 2 (limit: 2237)
Memory: 27.1M
CPU: 109ms
CGroup: /system.slice/mysqld.service
└─966428 /usr/local/mysql/bin/mysqld --skip-grant-tables --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock

Mar 26 09:34:05 sg.mydomain.com systemd[1]: Starting MySQL database server...
Mar 26 09:34:05 sg.mydomain.com mysqld[966428]: 2023-03-26 9:34:05 0 [Note] Starting MariaDB 10.6.12-MariaDB source revision 4c79e15cc3716f69c044d4287ad2160da8101cdc as process 966428
Mar 26 09:34:05 sg.mydomain.com mysqld[966428]: 2023-03-26 9:34:05 0 [ERROR] mysqld: Can't lock aria control file '/var/lib/mysql/aria_log_control' for exclusive use, error: 11. Will retry
 
# systemctl restart mysqld
Job for mysqld.service failed because the control process exited with error code.
See "systemctl status mysqld.service" and "journalctl -xeu mysqld.service" for details.
 
When i try to ./build roundcube

# ./build roundcube
###################################################################################################################################################################################### 100.0%
/usr/local/mysql/bin/mysqlshow: Can't connect to local server through socket '/usr/local/mysql/data/mysql.sock' (2)
Inserting data to mysql and creating database/user for roundcube...
ERROR 2002 (HY000): Can't connect to local server through socket '/usr/local/mysql/data/mysql.sock' (2)
Found MySQL version 10.6
 
Thanks, still stuck with this error after trying so many help guides.

###################################################################################################################################################################################### 100.0%
/usr/local/mysql/bin/mysqlshow: Access denied for user 'da_admin'@'localhost' (using password: YES)
Inserting data to mysql and creating database/user for roundcube...
ERROR 1045 (28000): Access denied for user 'da_admin'@'localhost' (using password: YES)
Found MySQL version 5.7
...
ERROR: SQLSTATE[HY000] [1045] Access denied for user 'da_roundcube'@'localhost' (using password: YES)

But I can access mysql -uroot -p with the password in /usr/local/directadmin/conf/mysql.conf
 
# ./build roundcube
###################################################################################################################################################################################### 100.0%
/usr/local/mysql/bin/mysqlshow: Access denied for user 'da_admin'@'localhost' (using password: YES)
Inserting data to mysql and creating database/user for roundcube...
ERROR 1045 (28000): Access denied for user 'da_admin'@'localhost' (using password: YES)
Found MySQL version 5.7
Creating User: CREATE USER 'da_roundcube'@'localhost' IDENTIFIED BY '<masked>';
ERROR 1045 (28000): Access denied for user 'da_admin'@'localhost' (using password: YES)
Granting access: GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,LOCK TABLES,INDEX,REFERENCES ON da_roundcube.* TO 'da_roundcube'@'localhost';
ERROR 1045 (28000): Access denied for user 'da_admin'@'localhost' (using password: YES)
Setting password: ALTER USER 'da_roundcube'@'localhost' IDENTIFIED BY '<masked>';
ERROR 1045 (28000): Access denied for user 'da_admin'@'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'da_roundcube'@'localhost' (using password: YES)
Database created, da_roundcube password is <masked>
Editing roundcube configuration...
###################################################################################################################################################################################### 100.0%
Roundcube 1.6.1 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
 
ERROR 1045 (28000): Access denied for user 'da_admin'@'localhost' (using password: YES)


You should address the error. Since you have an access to MySQL , update the da_admin password to the one specified in /usr/local/directadmin/conf/mysql.conf and /usr/local/directadmin/conf/my.cnf.

The files should have credentials for user da_admin.

You might read docs on how to change a MySQL password if you don't know yet.
 
Back
Top