MySQL - mysqld: Can't create/write to file '/var/run/mariadb/mariadb.pid' (Errcode: 13)

Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2023
Перейти к:навигация, поиск
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

MySQL - mysqld: Can't create/write to file '/var/run/mariadb/mariadb.pid' (Errcode: 13)

Ошибка вида:

# tail -f /var/log/mariadb/mariadb.log
InnoDB: Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshooting-datadict.html
InnoDB: for how to resolve the issue.  
170401  5:52:01  InnoDB: Waiting for the background threads to start
170401  5:52:02 Percona XtraDB (http://www.percona.com) 5.5.49-MariaDB-38.0 started; log sequence number 1746930324
170401  5:52:02 [Note] Plugin 'FEEDBACK' is disabled.
170401  5:52:02 [Note] Server socket created on IP: '0.0.0.0'.
170401  5:52:02 [ERROR] mysqld: Can't create/write to file '/var/run/mariadb/mariadb.pid' (Errcode: 13)
170401  5:52:02 [ERROR] Can't start server: can't create PID file: Permission denied
170401 05:52:02 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended


решается таким образом (для CentOS 7):

# chown mysql:mysql /var/run/mariadb
# systemctl restart mariadb