我重新安装了数据库服务器。我安装了 MariaDB,虽然它运行良好,但 MySQL Workbench 的某些方面很难与 MariaDB 兼容。最后我用标准 MySQL 8.0 安装替换了它。到目前为止,整个系统运行良好,但 Akonadi 服务似乎无法正常启动。
我使用 KOrganizer 保存所有活动,但由于它依赖于 Akonadi,因此无法启动。这是我得到的状态:
$ akonadictl start
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
org.kde.pim.akonadiserver: Starting up the Akonadi Server...
org.kde.pim.akonadiserver: Did not find MySQL server default configuration (mysql-global.conf)
org.kde.pim.akonadiserver: Failed to remove runtime connection config file
org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...
与第三行相反,MySQL 配置文件位于此位置:
$ /usr/sbin/mysqld --verbose --help | grep -A 1 "Default options"
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
无法重置该服务。我也无法重新安装它。有什么建议吗?
编辑 重新安装模块后,启动 Akonadi 时我收到此日志:
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
org.kde.pim.akonadiserver: Starting up the Akonadi Server...
org.kde.pim.akonadiserver: database server stopped unexpectedly
org.kde.pim.akonadiserver: Database process exited unexpectedly during initial connection!
org.kde.pim.akonadiserver: executable: "/usr/sbin/mysqld"
org.kde.pim.akonadiserver: arguments: ("--defaults-file=/home/shivendra/.local/share/akonadi/mysql.conf", "--datadir=/home/shivendra/.local/share/akonadi/db_data/", "--socket=/run/user/1000/akonadi/mysql.socket", "--pid-file=/run/user/1000/akonadi/mysql.pid")
org.kde.pim.akonadiserver: stdout: ""
org.kde.pim.akonadiserver: stderr: ""
org.kde.pim.akonadiserver: exit code: 1
org.kde.pim.akonadiserver: process error: "Unknown error"
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/run/user/1000/akonadi/mysql.socket' (2)'
Check that mysqld is running and that the socket: '/run/user/1000/akonadi/mysql.socket' exists!
org.kde.pim.akonadiserver: Failed to remove runtime connection config file
org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...
org.kde.pim.akonadicore: ""
org.kde.pim.akonadicore: Job error: "" for collection: QVector()
QSqlQuery::prepare: database not open
QSqlDatabasePrivate::removeDatabase: connection 'qt_sql_default_connection' is still in use, all queries will cease to work.
org.kde.pim.akonadi_search_xapian: Xapian Database does not exist at "/home/shivendra/.local/share/akonadi/search_db/calendars/"
org.kde.pim.akonadi_search_xapian: Xapian Database does not exist at "/home/shivendra/.local/share/akonadi/search_db/contacts/"
org.kde.pim.akonadi_search_xapian: Xapian Database does not exist at "/home/shivendra/.local/share/akonadi/search_db/email/"
org.kde.pim.akonadi_search_xapian: Xapian Database does not exist at "/home/shivendra/.local/share/akonadi/search_db/notes/"
org.kde.pim.akonadiconsole: DatabaseOpeningError "DatabaseOpeningError: Couldn't detect type of database"
答案1
您必须重新安装提供的包mysql-全局.conf文件经过
sudo apt-get install --reinstall akonadi-backend-mysql