Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1025784: mariadb-server-core-10.6: Can't connect to local server through socket '/run/mysqld/mysqld.sock' (111)

28 views
Skip to first unread message

Tim McConnell

unread,
Dec 8, 2022, 8:40:03 PM12/8/22
to
Package: mariadb-server-core-10.6
Version: 1:10.6.11-1
Severity: normal

Dear Maintainer,
I'm attempting to get the db installed and can't get it to start.
I found a KB on the mariadb site that tells you to disable the apparmor
profile
by running 'sudo ln -s /etc/apparmor.d/usr.sbin.mysqld
/etc/apparmor.d/disable/' and 'sudo apparmor_parser -R
/etc/apparmor.d/usr.sbin.mysqld' and restart maria via 'dpkg-
reconfigure
mariadb-server' then 'sudo systemctl restart mariadb.service'
Which gives this error:
Job for mariadb.service failed because the control process exited with
error
code:
See "systemctl status mariadb.service" and "journalctl -xeu
mariadb.service"
for details.

I've attached the results of journal control to this as maria-
errors.txt


-- System Information:
Debian Release: bookworm/sid
APT prefers testing-debug
APT policy: (500, 'testing-debug'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.0.0-5-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages mariadb-server-core-10.6 depends on:
ii libc6 2.36-6
ii libcrypt1 1:4.4.33-1
ii liblz4-1 1.9.4-1
ii libnuma1 2.0.15-1
ii libpcre2-8-0 10.40-2
ii libpmem1 1.12.1-1
ii libsnappy1v5 1.1.9-2
ii libssl3 3.0.7-1
ii libstdc++6 12.2.0-9
ii libsystemd0 252.2-1
ii liburing2 2.3-2
ii mariadb-common 1:10.6.11-1
ii zlib1g 1:1.2.11.dfsg-4.1

mariadb-server-core-10.6 recommends no packages.

mariadb-server-core-10.6 suggests no packages.

-- no debconf information
maria-errors.txt

Faustin Lammler

unread,
Jan 10, 2023, 7:02:34 AM1/10/23
to
Hi Tim!
Can you explain the steps you followed so I can try to reproduce this?

From your logs, it seems that your system tables are missing (mysql.db)
so it may be a problem with your datadir (normally /var/lib/mysql).

You may want to recreate those tables, see:
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db/

Before touching your datadir, please make sure that you have backups.

Cheers!

--
Faustin
GPG: F652 BCD1 1AA8 8975 F010 48A5 390A 2F27 832A 5C79
signature.asc

Tim McConnell

unread,
Jan 10, 2023, 5:00:04 PM1/10/23
to
Hi Faustin,
Steps to recreate:
1.Install Mariadb client/server
2. Attempt to run mysql -u root -p
3. fail to be able to login

Note I have the problem corrected, I used Maria-discuss mailing list to
get the answer.
Steps to fix:
run mysql_install_db
and then chown -R mysql:mysql /var/lib/mysql to fix the issue and
restart MariaDB again.
It's working now. I'm unsure why the permissions were wrong from the
install, I thought dpkg and the alternatives were supposed to set that
"auto-magically".

--
Tim McConnell <tmccon...@gmail.com>

Faustin Lammler

unread,
Jan 11, 2023, 5:00:04 AM1/11/23
to
Hi Tim!

Tim McConnell <tmccon...@gmail.com>,
10/01/2023 – 15:49:20 (-0600):

> Hi Faustin,
> Steps to recreate:
> 1.Install Mariadb client/server
> 2. Attempt to run mysql -u root -p
> 3. fail to be able to login

On a clean installation, I can't reproduce the problem with those steps
and this is heavily tested in our CI pipelines. So, my best guess is
that there is something else with your setup that caused the problem.

I can't be sure but what you described also in the mailing list makes me
think of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1022994, is
it possible that you had libpam-tmpdir package installed before
installing MariaDB?

You can verify with `dpkg -l | grep libpam-tmpdir`.

If that's the case, then this will be fixed in the next release, see:
https://salsa.debian.org/mariadb-team/mariadb-server/-/commit/cde8b8613e08ecb8d5f4a5de09d34418576d3040

And #1025784 should be marked as duplicate of #1022994.
signature.asc

Tim McConnell

unread,
Jan 11, 2023, 2:40:04 PM1/11/23
to
Hi Faustin,
I do have libpam-tempdir installed:
sudo dpkg -l | grep libpam-tmpdir
[sudo] password for tmick:
ii libpam-tmpdir 0.09+b2
amd64 automatic per-user temporary directories

However I was getting different errors. Like so:
RROR 2013 (HY000): Lost connection to server at 'handshake: reading
initial communication packet', system error: 104
and I have to use 'sudo systemctl start mariadb.socket' instead of
'sudo systemctl start mariadb.service' but it has to be restarted if
authentication fails.

And

2022-12-30 14:48:23 0 [ERROR] InnoDB: Operating system error number 13
in a file operation.
2022-12-30 14:48:23 0 [ERROR] InnoDB: The error means mariadbd does not
have the access rights to the directory.

MariaDB can't start because it can't read your files, the logs state it
very clearly:
Likely, you created the DB files and folders with the wrong
permissions. Please run : chown -R mysql:mysql /var/lib/mysql to fix
the issue and restart MariaDB again which allowed the DB to start etc.
I then had to initialize it with the install_db command. 
So I'm not sure if it's a duplicate of the bug you mention, I'll leave
that to you to decide.
Thanks!

--
Tim McConnell <tmccon...@gmail.com>

Faustin Lammler

unread,
Jan 12, 2023, 10:32:29 AM1/12/23
to
Control: merge -1 1022994
signature.asc

Faustin Lammler

unread,
Jan 12, 2023, 11:10:05 AM1/12/23
to
Control: close -1

#1025784 is duplicate of #1022994.
Closing as I can't merge this to #1022994.
signature.asc
0 new messages