User Tools

Site Tools


linux:apps:mariadb:mariadb-problems

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux:apps:mariadb:mariadb-problems [2026/08/23 07:48] – created oscarlinux:apps:mariadb:mariadb-problems [2026/08/23 08:07] (current) – [Permission problem] oscar
Line 14: Line 14:
  
 ==== Permission problem ==== ==== Permission problem ====
 +Error when starting mariadb.service
 +  /bin/sh: 1: cannot create /run/mysqld/wsrep-start-position: Permission denied
  
-/bin/sh: 1: cannot create /run/mysqld/wsrep-start-position: Permission denied +=== Problem description === 
- +The socket ///lib/systemd/system/mariadb.socket// is started by //sockets.target.wants// before the service //systemd-tmpfiles-setup.service//!
-/lib/systemd/system/mariadb.socket ---> started by ---> sockets.target.wants +
-before: systemd-tmpfiles-setup.service!+
 Due to this the directory /run/mysqld is already created with root:root ownership Due to this the directory /run/mysqld is already created with root:root ownership
- 
 Due to this: /lib/systemd/system/mariadb.service breaks because it cannot write in /run/mysqld Due to this: /lib/systemd/system/mariadb.service breaks because it cannot write in /run/mysqld
  
-Solution: add the following in mariadb.service: +=== Solution === 
-# ODG FIX +There are two possible fixes: 
-ExecStartPre=+/bin/sh -c "/usr/bin/chown mysql:mysql /run/mysqld" +== Solution 1 == 
 +Add the following in mariadb.service: 
 +  ExecStartPre=+/bin/sh -c "/usr/bin/chown mysql:mysql /run/mysqld" 
 +== Solution 2 == 
 +Disable the socket, which was not used anyway in our setup  
 +  systemctl disable mariadb.socket
linux/apps/mariadb/mariadb-problems.1787471311.txt.gz · Last modified: by oscar