Jeg havde prøveproblem med mysql. Jeg kører under root-tilladelse, men ved ikke, hvorfor denne fejl opstår. Problemet er, at mysql-brugeren ikke har tilladelse til at oprette pid-fil i /var/run/mysqld
.Fuld log kunne se sådan ud:
140812 09:35:53 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140812 9:35:53 InnoDB: Initializing buffer pool, size = 8.0M
140812 9:35:53 InnoDB: Completed initialization of buffer pool
140812 9:35:53 InnoDB: Started; log sequence number 0 197396648
140812 9:35:53 [ERROR] /usr/libexec/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 13)
140812 9:35:53 [ERROR] Can't start server: can't create PID file: Permission denied
140812 09:35:53 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
Så løsningen er at tildele mysql-bruger til denne mappe:
# chown mysql:mysql /var/run/mysqld
og start derefter mysqld
# service mysqld start