It's me again!

Otto,
I found out that it is an Akonadi problem: Akonadi uses Mariadb as default 
database, but does not provide mysqlcheck through dependencies.
Now I could repair the table structure with that knowledge, see the attached 
file.

Would you please add the Akonadi maintainer to this bug report?

Best regards
Ulrich

*** b e f o r e ***

bequimao@bullseye-kde:~$ cat .local/share/akonadi/db_data/mysql.err
2021-11-20 14:36:37 0 [Warning] WSREP: Failed to guess base node address. Set it explicitly via wsrep_node_address.
2021-11-20 14:36:37 0 [Warning] WSREP: Failed to guess base node address. Set it explicitly via wsrep_node_address.
2021-11-20 14:36:37 0 [Warning] WSREP: Guessing address for incoming client connections failed. Try setting wsrep_node_incoming_address explicitly.
2021-11-20 14:36:37 0 [Note] WSREP: Node addr:
2021-11-20 14:36:37 0 [Note] InnoDB: Uses event mutexes
2021-11-20 14:36:37 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-11-20 14:36:37 0 [Note] InnoDB: Number of pools: 1
2021-11-20 14:36:37 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2021-11-20 14:36:37 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
2021-11-20 14:36:37 0 [Note] InnoDB: Using Linux native AIO
2021-11-20 14:36:37 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2021-11-20 14:36:37 0 [Note] InnoDB: Completed initialization of buffer pool
2021-11-20 14:36:38 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=2932771735,2932771735
2021-11-20 14:36:44 0 [Note] InnoDB: Starting final batch to recover 231 pages from redo log.
2021-11-20 14:36:47 0 [Note] InnoDB: 128 rollback segments are active.
2021-11-20 14:36:47 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2021-11-20 14:36:47 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-11-20 14:36:47 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-11-20 14:36:47 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2021-11-20 14:36:47 0 [Note] InnoDB: 10.5.12 started; log sequence number 2933960231; transaction id 3191906
2021-11-20 14:36:47 0 [Note] InnoDB: Loading buffer pool(s) from /home/bequimao/.local/share/akonadi/db_data/ib_buffer_pool
2021-11-20 14:36:47 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-11-20 14:36:48 1 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
2021-11-20 14:36:48 0 [Note] Reading of all Master_info entries succeeded
2021-11-20 14:36:48 0 [Note] Added new Master_info '' to hash table
2021-11-20 14:36:48 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.5.12-MariaDB-0+deb11u1'  socket: '/run/user/1000/akonadi/mysql.socket'  port: 0  Debian 11
2021-11-20 14:36:48 4 [ERROR] InnoDB: Table `mysql`.`innodb_table_stats` not found.
2021-11-20 14:36:54 0 [Note] InnoDB: Buffer pool(s) load completed at 211120 14:36:54
bequimao@bullseye-kde:~$
bequimao@bullseye-kde:~$ mysql_upgrade --socket=/run/user/1000/akonadi/mysql.socket -v
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Can't execute 'mysqlcheck'
bequimao@bullseye-kde:~$
bequimao@bullseye-kde:~$

*** r o o t ****

root@bullseye-kde:~# dpkg -l | egrep 'mysql|mariadb|akonadi' | egrep -v libkf5 | sort
ii  akonadi-backend-mysql                         4:20.08.3-3                     all          MySQL storage backend for Akonadi
ii  akonadiconsole                                4:20.08.3-1                     amd64        management and debugging console for akonadi
ii  akonadi-contacts-data                         4:20.08.3-1                     all          Akonadi contacts access library - data files
ii  akonadi-mime-data                             4:20.08.3-1                     all          Akonadi MIME handling library - data files
ii  akonadi-server                                4:20.08.3-3                     amd64        Akonadi PIM storage service
ii  default-mysql-client-core                     1.0.7                           all          MySQL database core client binaries (metapackage)
ii  kmailtransport-akonadi:amd64                  20.08.3-1                       amd64        mail transport akonadi library
ii  libmariadb3:amd64                             1:10.5.12-0+deb11u1             amd64        MariaDB database client library
ii  libqt5sql5-mysql:amd64                        5.15.2+dfsg-9                   amd64        Qt 5 MySQL database driver
ii  libreoffice-sdbc-mysql                        1:7.0.4-4+deb11u1               amd64        MariaDB/MySQL SDBC driver for LibreOffice
ii  mariadb-client-core-10.5                      1:10.5.12-0+deb11u1             amd64        MariaDB database core client binaries
ii  mariadb-common                                1:10.5.12-0+deb11u1             all          MariaDB common configuration files
ii  mariadb-server-core-10.5                      1:10.5.12-0+deb11u1             amd64        MariaDB database core server files
ii  mysql-common                                  5.8+1.0.7                       all          MySQL database common files, e.g. /etc/mysql/my.cnf
root@bullseye-kde:~# apt-file search mysqlcheck
mariadb-client-10.5: /usr/bin/mysqlcheck  
mariadb-client-core-10.5: /usr/share/man/man1/mysqlcheck.1.gz
mariadb-test-data: /usr/share/mysql/mysql-test/main/mysqlcheck-master.opt
mariadb-test-data: /usr/share/mysql/mysql-test/main/mysqlcheck.opt
mariadb-test-data: /usr/share/mysql/mysql-test/main/mysqlcheck.result
mariadb-test-data: /usr/share/mysql/mysql-test/main/mysqlcheck.test
root@bullseye-kde:~# 
root@bullseye-kde:~# apt-get install mariadb-client
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  linux-image-4.19.0-17-amd64
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
  libconfig-inifiles-perl libdbd-mariadb-perl libdbi-perl libterm-readkey-perl mariadb-client-10.5
Suggested packages:
  libmldbm-perl libnet-daemon-perl libsql-statement-perl
The following NEW packages will be installed:
  libconfig-inifiles-perl libdbd-mariadb-perl libdbi-perl libterm-readkey-perl mariadb-client mariadb-client-10.5
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
....

*** a f t e r ***

bequimao@bullseye-kde:~$ mysql_upgrade --socket=/run/user/1000/akonadi/mysql.socket -v
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
MariaDB upgrade detected
Phase 1/7: Checking and upgrading mysql database
Processing databases
mysql
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.host                                         OK
mysql.ndb_binlog_index                             OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.proxies_priv                                 OK
mysql.servers                                      OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user                                         OK
Upgrading from a version before MariaDB-10.1
Phase 2/7: Installing used storage engines
Checking for tables with unknown storage engine
Phase 3/7: Fixing views from mysql
Processing databases
akonadi
information_schema
mysql
performance_schema
Phase 4/7: Running 'mysql_fix_privilege_tables'
Phase 5/7: Fixing table and database names
Processing databases
akonadi
information_schema
mysql
performance_schema
Phase 6/7: Checking and upgrading tables
Processing databases
akonadi
akonadi.collectionattributetable                   OK
akonadi.collectionmimetyperelation                 OK
akonadi.collectionpimitemrelation                  OK
akonadi.collectiontable                            OK
akonadi.flagtable                                  OK
akonadi.mimetypetable                              OK
akonadi.parttable                                  OK
akonadi.parttypetable                              OK
akonadi.pimitemflagrelation                        OK
akonadi.pimitemtable                               OK
akonadi.pimitemtagrelation                         OK
akonadi.relationtable                              OK
akonadi.relationtypetable                          OK
akonadi.resourcetable                              OK
akonadi.schemaversiontable                         OK
akonadi.tagattributetable                          OK
akonadi.tagremoteidresourcerelationtable           OK
akonadi.tagtable                                   OK
akonadi.tagtypetable                               OK
information_schema
performance_schema
Phase 7/7: Running 'FLUSH PRIVILEGES'
OK
bequimao@bullseye-kde:~$

*** r e b o o t ***

bequimao@bullseye-kde:~$ cat .local/share/akonadi/db_data/mysql.err
2021-11-20 15:09:51 0 [Note] InnoDB: Uses event mutexes
2021-11-20 15:09:51 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-11-20 15:09:51 0 [Note] InnoDB: Number of pools: 1
2021-11-20 15:09:51 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2021-11-20 15:09:51 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
2021-11-20 15:09:51 0 [Note] InnoDB: Using Linux native AIO
2021-11-20 15:09:51 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2021-11-20 15:09:51 0 [Note] InnoDB: Completed initialization of buffer pool
2021-11-20 15:09:56 0 [Note] InnoDB: 128 rollback segments are active.
2021-11-20 15:09:57 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-11-20 15:09:57 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-11-20 15:09:57 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2021-11-20 15:09:57 0 [Note] InnoDB: 10.5.12 started; log sequence number 2934271776; transaction id 3192329
2021-11-20 15:09:57 0 [Note] InnoDB: Loading buffer pool(s) from /home/bequimao/.local/share/akonadi/db_data/ib_buffer_pool
2021-11-20 15:09:57 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-11-20 15:09:57 0 [Note] Reading of all Master_info entries succeeded
2021-11-20 15:09:57 0 [Note] Added new Master_info '' to hash table
2021-11-20 15:09:57 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.5.12-MariaDB-0+deb11u1'  socket: '/run/user/1000/akonadi/mysql.socket'  port: 0  Debian 11
2021-11-20 15:10:06 0 [Note] InnoDB: Buffer pool(s) load completed at 211120 15:10:06
bequimao@bullseye-kde:~$

Reply via email to