mysql --execute "GRANT ALL PRIVILEGES ON *.* to admin@localhost identified by 'testpassword'; FLUSH PRIVILEGES;"
Your command, did not work;
root@redmine .../lib/mysql# mysql --execute "GRANT ALL PRIVILEGES ON *.* to admin@localhost identified by 'testpassword'; FLUSH PRIVILEGES;"
ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
Did a new vm deploy, no updates installed/ no manual changes done.
Besides the username or maybe related, there are some others errors see bold text:
Command used: journalctl -xeu mariadb.service
May 06 13:40:36 redmine mariadbd[2358]: 2024-05-06 13:40:36 0 [Note] Starting MariaDB 10.11.6-MariaDB-0+deb12u1 source revision as process 2358
May 06 13:40:36 redmine mariadbd[2358]: 2024-05-06 13:40:36 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
May 06 13:40:36 redmine mariadbd[2358]: 2024-05-06 13:40:36 0 [Note] InnoDB: Number of transaction pools: 1
May 06 13:40:36 redmine mariadbd[2358]: 2024-05-06 13:40:36 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
May 06 13:40:36 redmine mariadbd[2358]: 2024-05-06 13:40:36 0 [Note] InnoDB: Using liburing
May 06 13:40:36 redmine mariadbd[2358]: 2024-05-06 13:40:36 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
May 06 13:40:36 redmine mariadbd[2358]: 2024-05-06 13:40:36 0 [Note] InnoDB: Completed initialization of buffer pool
May 06 13:40:36 redmine mariadbd[2358]: 2024-05-06 13:40:36 0 [ERROR] InnoDB: File ./ib_logfile0 was not found
May 06 13:40:36 redmine mariadbd[2358]: 2024-05-06 13:40:36 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
May 06 13:40:36 redmine mariadbd[2358]: 2024-05-06 13:40:36 0 [Note] InnoDB: Starting shutdown...
May 06 13:40:36 redmine mariadbd[2358]: 2024-05-06 13:40:36 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
May 06 13:40:36 redmine mariadbd[2358]: 2024-05-06 13:40:36 0 [Note] Plugin 'FEEDBACK' is disabled.
May 06 13:40:36 redmine mariadbd[2358]: 2024-05-06 13:40:36 0 [Warning] 'innodb-file-format' was removed. It does nothing now and exists only for compatibility with old my.cnf files.
May 06 13:40:36 redmine mariadbd[2358]: 2024-05-06 13:40:36 0 [Warning] 'innodb-large-prefix' was removed. It does nothing now and exists only for compatibility with old my.cnf files.
May 06 13:40:36 redmine mariadbd[2358]: 2024-05-06 13:40:36 0 [ERROR] Unknown/unsupported storage engine: InnoDB
May 06 13:40:36 redmine mariadbd[2358]: 2024-05-06 13:40:36 0 [ERROR] Aborting
May 06 13:40:36 redmine systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Following command:
root@redmine .../lib/mysql# systemctl status mariadb.service
x mariadb.service - MariaDB 10.11.6 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Mon 2024-05-06 13:50:22 UTC; 6s ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Process: 2716 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Process: 2718 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 2720 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, stat>
Process: 2804 ExecStart=/usr/sbin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Main PID: 2804 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
CPU: 313ms
May 06 13:50:22 redmine mariadbd[2804]: 2024-05-06 13:50:22 0 [Note] InnoDB: Starting shutdown...
May 06 13:50:22 redmine mariadbd[2804]: 2024-05-06 13:50:22 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
May 06 13:50:22 redmine mariadbd[2804]: 2024-05-06 13:50:22 0 [Note] Plugin 'FEEDBACK' is disabled.
May 06 13:50:22 redmine mariadbd[2804]: 2024-05-06 13:50:22 0 [Warning] 'innodb-file-format' was removed. It does nothing now and exists only for compatibility with old my.cnf files.
May 06 13:50:22 redmine mariadbd[2804]: 2024-05-06 13:50:22 0 [Warning] 'innodb-large-prefix' was removed. It does nothing now and exists only for compatibility with old my.cnf files.
May 06 13:50:22 redmine mariadbd[2804]: 2024-05-06 13:50:22 0 [ERROR] Unknown/unsupported storage engine: InnoDB
May 06 13:50:22 redmine mariadbd[2804]: 2024-05-06 13:50:22 0 [ERROR] Aborting
May 06 13:50:22 redmine systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
May 06 13:50:22 redmine systemd[1]: mariadb.service: Failed with result 'exit-code'.
May 06 13:50:22 redmine systemd[1]: Failed to start mariadb.service - MariaDB 10.11.6 database server.
Defaults access rights on files:
aria_log_control ib_buffer_pool multi-master.info mysql_upgrade_info redmine_development redmine_production redmine_test sys
root@redmine .../lib/mysql# ls -l
total 78292
-rw-rw---- 1 mysql mysql 417792 May 6 13:40 aria_log.00000001
-rw-rw---- 1 mysql mysql 52 May 6 13:40 aria_log_control
-rw-r--r-- 1 root root 0 Mar 13 20:52 debian-10.11.flag
-rw-rw---- 1 mysql mysql 2616 May 6 13:38 ib_buffer_pool
-rw-rw---- 1 mysql mysql 79691776 May 6 13:38 ibdata1
-rw-rw---- 1 mysql mysql 0 Mar 13 21:37 multi-master.info
drwx------ 2 mysql mysql 4096 Mar 13 20:53 mysql
-rw-r--r-- 1 root root 15 Mar 13 20:53 mysql_upgrade_info
drwx------ 2 mysql mysql 4096 Mar 13 20:53 performance_schema
drwx------ 2 mysql mysql 4096 Mar 13 21:41 redmine_development
drwx------ 2 mysql mysql 4096 Mar 13 21:37 redmine_development@003b
drwx------ 2 mysql mysql 4096 Mar 13 21:42 redmine_production
drwx------ 2 mysql mysql 4096 Mar 13 21:37 redmine_production@003b
drwx------ 2 mysql mysql 4096 Mar 13 21:41 redmine_test
drwx------ 2 mysql mysql 4096 Mar 13 21:37 redmine_test@003b
drwx------ 2 mysql mysql 12288 Mar 13 20:53 sys
From this moment, i did some changes.
I did a small test, by deleting the mysql data:
cd /var/lib/mysql
ls
rm -r *
mysql_install_db --user=msql --basedir=/usr --datadir=/var/lib/mysql
systemctl start mysqld
systemctl start mysql.service
systemctl start mariadb
mysql
Then mariadb starts ok, also in webmin if user/pass are adjusted in mariadb config, but ofcouse have lost the redmine databases.
However there seems to be something wrong with the data(maybe some file corruption) or access rights in /var/lib/mysql/
Have made a snapshot of default installation, so i can change things at will and go back to orginial state. If you want me to test it out.
mysql --execute "GRANT ALL
Did a new vm deploy, no updates installed/ no manual changes done.
Besides the username or maybe related, there are some others errors see bold text:
Following command:
root@redmine .../lib/mysql# systemctl status mariadb.service
From this moment, i did some changes.
Then mariadb starts ok, also in webmin if user/pass are adjusted in mariadb config, but ofcouse have lost the redmine databases.
However there seems to be something wrong with the data(maybe some file corruption) or access rights in /var/lib/mysql/
Have made a snapshot of default installation, so i can change things at will and go back to orginial state. If you want me to test it out.