LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-07-2019, 05:13 AM   #1
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 368
Blog Entries: 1

Rep: Reputation: 48
KMail won't start because of akonadi and mysql


When starting kmail from the command line, I can see that akonadi can't connect to mysql.


Code:
    ychaouche#Bahloola 18:24:07 ~/.local/share $ kmail&
    [2] 7962
    ychaouche#Bahloola 18:24:18 ~/.local/share $ ls akonadi-/Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
    org.kde.pim.akonadiserver: Starting up the Akonadi Server...
    org.kde.pim.akonadiserver: Failed to use database "akonadi"
    org.kde.pim.akonadiserver: Database error: "Can't connect to local MySQL server through socket '/tmp/akonadi-ychaouche.NL0sL9/mysql.socket' (2) QMYSQL: Unable to connect"
    org.kde.pim.akonadiserver: Failed to connect to database!
    org.kde.pim.akonadiserver: Database error: "Can't connect to local MySQL server through socket '/tmp/akonadi-ychaouche.NL0sL9/mysql.socket' (2) QMYSQL: Unable to connect"
    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...
    No text-to-speech plug-ins were found.
    org.kde.pim.akonadicore: Job error:  "" for collection: QVector()

    org.kde.pim.akonadicore: Job error:  "" for collection: QVector()

    org.kde.pim.messagelist: Failed to load tags  ""
    org.kde.pim.kmail: ""
    org.kde.pim.kmail: ""
    ychaouche#Bahloola 18:24:51 ~/.local/share $
The same errors are logged in the akonadi error log Akonadi.error

Code:
    ychaouche#Bahloola 18:26:28 ~/.local/share/akonadi $ cat Akonadi.error
    2019-11-06T18:24:21 [INFO ] org.kde.pim.akonadiserver: Starting up the Akonadi Server...
    2019-11-06T18:24:21 [CRITICAL] org.kde.pim.akonadis2019-11-06T18:24:21 [INFO ] org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...
    : "Can't connect to local MySQL server through socket '/tmp/akonadi-ychaouche.NL0sL9/mysql.socket' (2) QMYSQL: Unable to connect"
    2019-11-06T18:24:21 [CRITICAL] org.kde.pim.akonadiserver: Failed to connect to database!
    2019-11-06T18:24:21 [CRITICAL] org.kde.pim.akonadiserver: Database error: "Can't connect to local MySQL server through socket '/tmp/akonadi-ychaouche.NL0sL9/mysql.socket' (2) QMYSQL: Unable to connect"
    2019-11-06T18:24:21 [CRITICAL] org.kde.pim.akonadiserver: Failed to remove runtime connection config file
    2019-11-06T18:24:21 [INFO ] org.kde.pim.akonadiserver: Shutting down AkonadiServer...
    ychaouche#Bahloola 18:26:31 ~/.local/share/akonadi $
I wonder why it couldn't connect to the database. /usr/sbin/mysqld is there, but there's no mysql file in /etc/init.d/

Code:
    ychaouche#Bahloola 18:28:32 ~/.local/share/akonadi $ service mysql status
    Unit mysql.service could not be found.
    ychaouche#Bahloola 18:29:22 ~/.local/share/akonadi $ service mysqld status
    Unit mysqld.service could not be found.
    ychaouche#Bahloola 18:29:24 ~/.local/share/akonadi $



I try to run mysqld from the command line, with sudo

Code:
    ychaouche#Bahloola 18:29:24 ~/.local/share/akonadi $ mysqld status
    mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 2 - No such file or directory)
    2019-11-06T17:29:56.060464Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    2019-11-06T17:29:56.060565Z 0 [Warning] Can't create test file /var/lib/mysql/Bahloola.lower-test
    2019-11-06T17:29:56.060577Z 0 [Warning] Insecure configuration for --secure-file-priv: Location is accessible to all OS users. Consider choosing a different directory.
    2019-11-06T17:29:56.060595Z 0 [Note] mysqld (mysqld 5.7.27-0ubuntu0.18.04.1) starting as process 8502 ...
    2019-11-06T17:29:56.071141Z 0 [Warning] Can't create test file /var/lib/mysql/Bahloola.lower-test
    2019-11-06T17:29:56.071158Z 0 [Warning] Can't create test file /var/lib/mysql/Bahloola.lower-test
    2019-11-06T17:29:56.071189Z 0 [ERROR] failed to set datadir to /var/lib/mysql/
    2019-11-06T17:29:56.071196Z 0 [ERROR] Aborting

    2019-11-06T17:29:56.071208Z 0 [Note] Binlog end
    2019-11-06T17:29:56.071249Z 0 [Note] mysqld: Shutdown complete

    ychaouche#Bahloola 18:29:56 ~/.local/share/akonadi $

It seems many things are broken on my system, which is a fresh install of neon user 5.17

Code:
    ychaouche#Bahloola 18:31:09 ~/.local/share/akonadi $ lsb_release -a
    No LSB modules are available.
    Distributor ID: neon
    Description:    KDE neon User Edition 5.17
    Release:        18.04
    Codename:       bionic
    ychaouche#Bahloola 18:31:15 ~/.local/share/akonadi $
 
Old 11-07-2019, 10:06 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
Can you start kmail from the GUI menu?
 
Old 11-10-2019, 04:30 AM   #3
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 368

Original Poster
Blog Entries: 1

Rep: Reputation: 48
Yes, but with same errors.

Click image for larger version

Name:	tyigGYL.png
Views:	56
Size:	33.3 KB
ID:	31800

Clicking on details doesn't show anything. The whole thing seems deeply borken.
 
Old 11-10-2019, 12:15 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
It looks to me like mysqld is not running...maybe it's not even installed.

What does
Code:
which mysqld
return?
 
Old 11-10-2019, 01:04 PM   #5
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 368

Original Poster
Blog Entries: 1

Rep: Reputation: 48
It is NOT installed ! only mysql-server-core-5.7 is.

Code:
ychaouche#Bahloola 19:56:58 ~ $ dpkg -s mysql-server-core-5.7
Package: mysql-server-core-5.7
Status: install ok installed
Priority: optional
Section: database
Installed-Size: 45413
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Source: mysql-5.7
Version: 5.7.27-0ubuntu0.18.04.1
Replaces: mariadb-client-10.0 (<< 10.0.16-2~), mysql-client-5.5 (<< 5.6), mysql-client-5.6 (<< 5.6.22-1~), mysql-server-5.5, mysql-server-5.6 (<< 5.6.25-3~), mysql-server-core-5.5, mysql-server-core-5.6 (<< 5.7), virtual-mysql-server-core
Provides: virtual-mysql-server-core
Depends: libaio1 (>= 0.3.93), libc6 (>= 2.16), libgcc1 (>= 1:4.0), liblz4-1 (>= 0.0~r130), libnuma1 (>= 2.0.11), libstdc++6 (>= 5.2), libwrap0 (>= 7.6-4~), zlib1g (>= 1:1.2.0)
Breaks: mariadb-client-10.0 (<< 10.0.16-2~), mysql-client-5.6 (<< 5.6.22-1~), mysql-server-5.5, mysql-server-5.6 (<< 5.6.25-3~), mysql-server-core-5.6 (<< 5.7)
Conflicts: mysql-client-5.5 (<< 5.6), mysql-server-core-5.5, virtual-mysql-server-core
Description: MySQL database server binaries
 MySQL is a fast, stable and true multi-user, multi-threaded SQL database
 server. SQL (Structured Query Language) is the most popular database query
 language in the world. The main goals of MySQL are speed, robustness and
 ease of use.
 .
 This package includes the server binaries but doesn't contain all the
 infrastructure needed to setup system databases.
Homepage: http://dev.mysql.com/
Original-Maintainer: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
ychaouche#Bahloola 19:57:06 ~ $
This is not normal ! akonadi is not a minor piece in KDE and it stores some of its data in a mysql database. I wonder why KDE Neon ships without it !

Now, I can finally :

Code:
ychaouche#Bahloola 20:01:37 ~ $ /etc/init.d/mysql status
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-11-10 20:01:08 CET; 45s ago
 Main PID: 25124 (mysqld)
    Tasks: 27 (limit: 4402)
   CGroup: /system.slice/mysql.service
           └─25124 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid

Nov 10 20:01:07 Bahloola systemd[1]: Starting MySQL Community Server...
Nov 10 20:01:08 Bahloola systemd[1]: Started MySQL Community Server.

ychaouche#Bahloola 20:01:58 ~ $
Still

Code:
ychaouche#Bahloola 20:03:05 ~ $ kmail
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
org.kde.pim.akonadiserver: Starting up the Akonadi Server...
org.kde.pim.akonadiserver: Failed to use database "akonadi"
org.kde.pim.akonadiserver: Database error: "Can't connect to local MySQL server through socket '/tmp/akonadi-ychaouche.NL0sL9/mysql.socket' (2) QMYSQL: Unable to connect"
org.kde.pim.akonadiserver: Failed to connect to database!
org.kde.pim.akonadiserver: Database error: "Can't connect to local MySQL server through socket '/tmp/akonadi-ychaouche.NL0sL9/mysql.socket' (2) QMYSQL: Unable to connect"
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...
No text-to-speech plug-ins were found.
org.kde.pim.akonadicore: Job error:  "" for collection: QVector() 

org.kde.pim.akonadicore: Job error:  "" for collection: QVector() 

org.kde.pim.messagelist: Failed to load tags  ""
org.kde.pim.kmail: ""
org.kde.pim.kmail: ""




^C
ychaouche#Bahloola 20:03:57 ~ $
 
Old 11-10-2019, 03:54 PM   #6
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Now that it's running, perhaps you need to check the configuration to be sure it's set up correctly.
Mine is in /etc/my.cnf

Is Debian a systemd distro?

I also note this in your output -- emphasis added
Code:
 This package includes the server binaries but doesn't contain all the
 infrastructure needed to setup system databases.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] akonadi mysql mariadb kmail korganizer trouble on current and with kde4 and kde5 mrapathy Slackware 8 10-28-2017 08:43 AM
SSH tunnel proxy in Akonadi/Kontact/KMail desade Linux - Networking 5 01-18-2017 08:55 AM
[SOLVED] current, akonadi, mariadb, mysql and kmail pchristy Slackware 4 03-17-2016 06:43 AM
kmail quits with akonadi server self-test errors on slackware -current chytraeus Slackware 3 05-28-2011 11:59 AM
kmail + kaddressbook + akonadi integration in F14. rgaelzer Linux - Software 0 03-17-2011 02:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration