You are not logged in.

#1 2013-03-26 13:16:50

DerJudge
Member
From: NRW, Germany
Registered: 2013-03-26
Posts: 24
Website

MariaDB not starting due to missing /run/mysqld directory

Hi everyone,

this is my first strike in the Forums, so please do not hurt me if I'm doing something wrong smile

I already used the forum's search (using "mariadb /run" ad buzzwords), but didn't find a thing.

I just installed MariaDB like described ion the wiki. But when I start it, I get these:

Mar 26 14:04:19 alarmpi systemd[1]: Starting MariaDB database server...
Mar 26 14:04:20 alarmpi mysqld[6626]: 130326 14:04:20 InnoDB: The InnoDB memory heap is disabled
Mar 26 14:04:20 alarmpi mysqld[6626]: 130326 14:04:20 InnoDB: Mutexes and rw_locks use GCC atomic builtins
Mar 26 14:04:20 alarmpi mysqld[6626]: 130326 14:04:20 InnoDB: Compressed tables use zlib 1.2.7
Mar 26 14:04:20 alarmpi mysqld[6626]: 130326 14:04:20 InnoDB: Initializing buffer pool, size = 16.0M
Mar 26 14:04:20 alarmpi mysqld[6626]: 130326 14:04:20 InnoDB: Completed initialization of buffer pool
Mar 26 14:04:20 alarmpi mysqld[6626]: 130326 14:04:20 InnoDB: highest supported file format is Barracuda.
Mar 26 14:04:20 alarmpi mysqld[6626]: 130326 14:04:20  InnoDB: Waiting for the background threads to start
Mar 26 14:04:21 alarmpi mysqld[6626]: 130326 14:04:21 Percona XtraDB (http://www.percona.com) 5.5.30-MariaDB-30.1 started; log sequence number 1597945
Mar 26 14:04:26 alarmpi mysqld[6626]: 130326 14:04:26 [ERROR] Can't start server : Bind on unix socket: No such file or directory
Mar 26 14:04:26 alarmpi mysqld[6626]: 130326 14:04:26 [ERROR] Do you already have another mysqld server running on socket: /run/mysqld/mysqld.sock ?
Mar 26 14:04:26 alarmpi mysqld[6626]: 130326 14:04:26 [ERROR] Aborting

I already figured out that this happens due to a missing directory /run/mysqld ; once this is created, it works like a charm. But just creating it manually won't fix this, since /run is a tmpfs . So next boot, this will happen again.

I tried to edit /usr/lib/systemd/system/mysqld.service and added 'ExecStartPre=mkdir -p /run/mysqld' to it, but this didn't work. Also, it looks like a little bit weird solution even if it works, don't it?

Could someone more familiar with MariaDB/Systemd/ArchLinux please assist ?

Thank you ! smile

Offline

#2 2013-03-26 13:26:29

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,846
Website

Re: MariaDB not starting due to missing /run/mysqld directory

The mariadb package should come with a tmpfile.d config file that creates this directory at boot time (/usr/lib/tmpfiles.d/mysql.conf).

Read up on the tmpfiles.d man page if you're curious what these files do.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

#3 2013-03-26 14:30:08

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: MariaDB not starting due to missing /run/mysqld directory

You actually found a bug in the mariadb package there. The package is supposed to run "systemd-tmpfiles --create mysql.conf" to make sure this directory exists after installing.

Looking at the .install file, it runs "systemd-tmpfiles --create mysqld.conf" instead which fails (I wonder why there is no error message on installing). Please file a bug report about this.

edit: to clarify, the directory will automatically be created on every boot by the systemd-tmpfiles-setup service, so everything should just work after a reboot. The problem is that currently the directory isn't created after installing the package so it won't work unless you create the directory manually or reboot.

Last edited by 65kid (2013-03-26 14:34:10)

Offline

#4 2013-03-26 15:09:12

Barthalion
Forum Fellow
From: Poland
Registered: 2010-02-26
Posts: 111

Re: MariaDB not starting due to missing /run/mysqld directory

I'll push fixed package in a moment.

Offline

Board footer

Powered by FluxBB