Unable to start akonadiserver

Cannot start akonadiserver even without any exsiting data.

Back up my old data, and try to start akonadiserver result like this:

Could not open required defaults file: /etc/xdg/akonadi/mysql-global.conf
Fatal error in defaults handling. Program aborted
/usr/bin/mariadb-install-db: line 434: /usr/bin/uname: Permission denied
Installing MariaDB/MySQL system tables in ‘/home/$USER/.local/share/akonadi/db_data/’ …
cat: /usr/share/mariadb/mariadb_system_tables.sql: Permission denied
cat: /usr/share/mariadb/mariadb_performance_tables.sql: Permission denied
cat: /usr/share/mariadb/mariadb_system_tables_data.sql: Permission denied
cat: /usr/share/mariadb/fill_help_tables.sql: Permission denied
cat: /usr/share/mariadb/maria_add_gis_sp_bootstrap.sql: Permission denied
cat: /usr/share/mariadb/mariadb_sys_schema.sql: Permission denied
cat: /usr/share/mariadb/mariadb_test_db.sql: Permission denied

But I can execute these command normally in terminal.

So What went wrong?

I tend to not switch backend since I have lots of existing data with akonadi.

There is akonadi-db-migrator if you want to migrate to sqlite (the default since KDE PIM 24.02) without losing your data. You need to run akonadi-db-migrator --newengine sqlite

Thanks. But now I get the following error:

eading datadir from the MariaDB server failed. Got the following error when executing the ‘mysql’ command li
ne client
ERROR 1049 (42000): Unknown database ‘mysql’
FATAL ERROR: Upgrade failed

But the database ‘mysql’ actually exists. Any idea for that?

Most likely your database has a name that is not ‘mysql’. It may be ‘mysql-gfirwafh’ or something like that.

You can comment on the original merge request for akonadi-db-migrator as i’m not sure if this is a bug or feature.

I can confirm the database mysql do exist.

But since the new default backend is sqlite, I’ll backup my old data and switch to it and start from scartch.

There’s something wrong with mariadb installed on my computer, I managed to use this command and mitigate to sqlite database on other computer. Thanks for pointing out that command.