Появяилась новая проблема на CentOS 7, при установке MariaDB 10.3 — Как обновить
tail /var/log/mariadb/mariadb.log 2019-04-11 9:38:27 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2019-04-11 9:38:27 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2019-04-11 9:38:27 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2019-04-11 9:38:27 0 [Note] InnoDB: Waiting for purge to start 2019-04-11 9:38:27 0 [Note] InnoDB: 10.3.14 started; log sequence number 3679369; transaction id 2249 2019-04-11 9:38:27 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool 2019-04-11 9:38:27 0 [Note] Plugin 'FEEDBACK' is disabled. 2019-04-11 9:38:27 0 [Note] Server socket created on IP: '::'. 2019-04-11 9:38:27 0 [ERROR] mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2 "No such file or directory") 2019-04-11 9:38:27 0 [ERROR] Can't start server: can't create PID file: No such file or directory
Временное решение проблемы:
nano /etc/systemd/system/mariadbfix.service
Добавить код:
[Unit] Description=Fix permission with /var/run/mysqld After=network.target [Service] Type=simple ExecStartPre=-/usr/bin/mkdir /var/run/mysqld ExecStart=/usr/bin/chown mysql:mysql /var/run/mysqld Restart=on-abort [Install] WantedBy=multi-user.target
Включить новую службу в systemd
systemctl start mariadbfix systemctl enable mariadbfix systemctl status mariadbfix
Перезапустите сервер или mariadb
systemctl restart mysql
Source https://felix90.ru/2018/01/error-mysqld-cant-createwrite-to-file-varrunmysqldmysqld-pid-errcode-2-no-such-file-or-directory/