Cannot connect to a mysqld socket

I get error 2002. The command mysql -S$socket works all right.

What operating system? Which version of Libre Office? Is this when you try to set up a new database, or is it happening on one that has worked at some time in the past? What, if you can put your finger on it, made “the past” different?

System operacyjny: openSUSE Tumbleweed 20221130
Wersja Plazmy KDE: 5.26.4
Wersja Szkieletów KDE: 5.100.0
Wersja Qt: 5.15.7
Wersja jądra: 6.0.8-1-default (64-bity)
Platforma graficzna: X11
Procesory: 4 × Intel® Core™2 Quad CPU Q6600 @ 2.40GHz
Pamięć: 7,6 GiB RAM-u
Procesor graficzny: AMD TURKS
Wytwórca: Dell Inc.
Nazwa produktu: OptiPlex 755

Status SQL: HY000
Kod błędu: 2002

Can’t connect to server on ‘localhost’ (111) at /home/abuild/rpmbuild/BUILD/libreoffice-7.4.3.2/connectivity/source/drivers/mysqlc/mysqlc_general.cxx:120

Set up a new database. It never worked.

You really started MariaDB as server? (OpenSUSE → Yast → ServiceManager → mariadb → start at system start)

Never had a problem to get it running with OpenSUSE, here Leap 15.3. I have written all steps in German Base Handbuch, but whole of the special MaraiaDB-content hasn’t been translated into English …
If you want to connet to socket you have to define this in the connection settings. Default is connecting to server - and it seems you have written this in the connection settings.

I am trying to connect to /run/user/1000/akonadi/mysql.socket.

Have a look at /etc/my.cnf. It defines
socket = /run/mysql/mysql.sock
as default. So I tried this:
Connection_Socket
Works without problems. Also with socket you have chosen: /run/user/1000/akonadi/mysql.socket
Then I tried to reproduce the error you got:
Server_not_started
I have stopped the server and then the error appears.

Seems you haven’t started the server.
Which version of LO do you use? Directly from LibreOffice or the version OpenSUSE supports? I’m only working with versions directly from LibreOffice, but have also tested this with the special OpenSUSE-Version (LO 7.3.6.2 for OpenSUSE 15.3). works also. But I wouldn’t use this version for databases, because reports won’t run with this version of LO.

Version: 7.4.3.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 4; OS: Linux 6.0; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pl-PL (pl_PL.UTF-8); UI: pl-PL
Calc: threaded

The server is started by akonadi, which is started by systemd.

Have tried this: Set maraidb to start manually. Then restart my system.
Can’t connect to MariaDB while Akonadi is running, because MariaDB hasn’t started. Could see this through Yast. Don’t know how Akonadi works, but there won’t be saved anything in any database in MariaDB here.

Start MariaDB at start of your system and connection from Base to MariaDB will work well. Starting Akonadi wouldn’t help.

Akonadi starts its own local MySQL server
see: Do I need a running MySQL server?

If you are looking for a description who to start with MySQL/MariaDB when sever has been started: Have written this for OpenSUSE in German Base Handbuch. It is the same you could find in older Base Guides like this: Base Guide 6.4, p. 56 ff.

Akonadi starts its own instance of MariaDB server and uses it to store data.

… and that’s the reason why you can’t connect to MariaDB/MySQL this way. It’s running only with Akonadi, not as MariaDB server. You have to install MariaDB server and start this server to get a connection to MariaDB with Base.
You couldn’t connect through Akonadi, because there is set for MySQL: skip_networking.

Please explain what you mean by a MariaDB server not running as a MariaDB server :rofl:

Your YaST‑centric descriptions suggest that you are trying to complain about the server not running as a service. But there should be no problem connecting to a local server that is not being run as a service :thinking:

skip_networking does not switch UNIX family sockets off, otherwise mysql command would not work. And no, I am not trying to connect through Akonadi (that would imply using Akonadi API to connect).

Sorry, I could only write down what is running and what not. If you won’t try it it isn’t my problem.

Connection through localhost doesn’t work with Akonadi and it’s separate MySQL/MariaDB configuration, but works a server started by the system.

Will be my last post here.

A UNIX socket connection is not a connection through localhost. localhost is an Intranet concept.
Also, trying to use MariaDB as a service would not get me access to the Akonadi DB, so while your advice is very :heart: :slightly_smiling_face: it looks absolutely pointless :slightly_frowning_face:

Bug 152370