I have a fresh install of Debian stretch, with a fresh install of percona 5.7.
I try to start the mysql service:
service mysql start
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
systemctl status mysql.service
systemctl status mysql.service
● mysql.service - Percona Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: deactivating (final-sigterm) (Result: exit-code) since Thu 2017-11-09 15:24:45 MST; 18h ago
Process: 23866 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=1/FAILURE)
Process: 23858 ExecStartPre=/usr/bin/ps_mysqld_helper (code=exited, status=0/SUCCESS)
Process: 23817 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 21289 (code=exited, status=0/SUCCESS)
Tasks: 2 (limit: 7372)
CGroup: /system.slice/mysql.service
└─23869 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
Nov 10 10:16:59 dbase1 systemd[1]: Starting Percona Server...
Nov 10 10:17:12 dbase1 systemd[1]: mysql.service: Control process exited, code=exited status=1
journalctl -xe
journalctl -xe
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mysql.service has finished shutting down.
Nov 10 10:17:19 dbase1 systemd[1]: Starting Percona Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mysql.service has begun starting up.
Nov 10 10:17:33 dbase1 mysqld[23962]: Initialization of mysqld failed: 0
Nov 10 10:17:33 dbase1 systemd[1]: mysql.service: Control process exited, code=exited status=1
Nov 10 10:17:38 dbase1 systemd[1]: Failed to start Percona Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mysql.service has failed.
--
-- The result is failed.
Nov 10 10:17:38 dbase1 systemd[1]: mysql.service: Unit entered failed state.
Nov 10 10:17:38 dbase1 systemd[1]: mysql.service: Failed with result 'exit-code'.
Nov 10 10:17:39 dbase1 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Nov 10 10:17:39 dbase1 systemd[1]: Stopped Percona Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mysql.service has finished shutting down.
Nov 10 10:17:39 dbase1 systemd[1]: Starting Percona Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mysql.service has begun starting up.
Nov 10 10:17:52 dbase1 mysqld[24053]: Initialization of mysqld failed: 0
Nov 10 10:17:52 dbase1 systemd[1]: mysql.service: Control process exited, code=exited status=1
Nov 10 10:17:57 dbase1 systemd[1]: Failed to start Percona Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mysql.service has failed.
--
-- The result is failed.
Nov 10 10:17:57 dbase1 systemd[1]: mysql.service: Unit entered failed state.
Nov 10 10:17:57 dbase1 systemd[1]: mysql.service: Failed with result 'exit-code'.
Nov 10 10:17:57 dbase1 systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Nov 10 10:17:57 dbase1 systemd[1]: Stopped Percona Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mysql.service has finished shutting down.
Nov 10 10:17:57 dbase1 systemd[1]: Starting Percona Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mysql.service has begun starting up.
Nov 10 10:18:11 dbase1 mysqld[24146]: Initialization of mysqld failed: 0
Nov 10 10:18:11 dbase1 systemd[1]: mysql.service: Control process exited, code=exited status=1
Weird that it just seems to say it failed, but not why.
To rule out permissions, there a are the listings for the relevant directory:
ls -la /var/lib/mysql
total 1061580
drwxr-x--- 6 mysql mysql 4096 Nov 9 16:00 .
drwxr-xr-x 26 root root 4096 Nov 8 16:44 ..
-rw-r----- 1 mysql mysql 56 Nov 8 16:44 auto.cnf
drwxr-xr-x 2 mysql mysql 4096 Nov 9 15:59 binlog
-rw------- 1 mysql mysql 1680 Nov 8 16:44 ca-key.pem
-rw-r--r-- 1 mysql mysql 1083 Nov 8 16:44 ca.pem
-rw-r--r-- 1 mysql mysql 1087 Nov 8 16:44 client-cert.pem
-rw------- 1 mysql mysql 1680 Nov 8 16:44 client-key.pem
-rw-r----- 1 mysql mysql 293 Nov 9 15:24 ib_buffer_pool
-rw-r----- 1 mysql mysql 12582912 Nov 9 15:24 ibdata1
-rw-r----- 1 mysql mysql 536870912 Nov 9 15:24 ib_logfile0
-rw-r----- 1 mysql mysql 536870912 Nov 9 13:34 ib_logfile1
drwxr-x--- 2 mysql mysql 4096 Nov 8 16:44 mysql
-rw-r----- 1 mysql mysql 645404 Nov 9 15:24 mysql-error.log
-rw-r----- 1 mysql mysql 650 Nov 9 13:56 mysql-slow.log
drwxr-x--- 2 mysql mysql 4096 Nov 8 16:44 performance_schema
-rw------- 1 mysql mysql 1676 Nov 8 16:44 private_key.pem
-rw-r--r-- 1 mysql mysql 452 Nov 8 16:44 public_key.pem
-rw-r--r-- 1 mysql mysql 1087 Nov 8 16:44 server-cert.pem
-rw------- 1 mysql mysql 1676 Nov 8 16:44 server-key.pem
drwxr-x--- 2 mysql mysql 12288 Nov 8 16:44 sys
and:
ls -la /var/run/mysqld/
total 0
drwxr-xr-x 2 mysql mysql 40 Nov 9 15:24 .
drwxr-xr-x 17 root root 520 Nov 9 13:26 ..
everything is owned by mysql so it should be fine
and here is the my.cnf:
cat /etc/mysql/my.cnf
# Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208
# Configuration name dbase1-1 generated for sama@mt.net at 2017-11-09 00:17:23
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/percona-server.conf.d/
[mysql]
# CLIENT #
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
# GENERAL #
user = mysql
default-storage-engine = InnoDB
socket = /var/lib/mysql/mysql.sock
pid-file = /var/lib/mysql/mysql.pid
# MyISAM #
key-buffer-size = 32M
myisam-recover = FORCE,BACKUP
# SAFETY #
max-allowed-packet = 16M
max-connect-errors = 1000000
skip-name-resolve
sql-mode = STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY
sysdate-is-now = 1
innodb = FORCE
# DATA STORAGE #
datadir = /var/lib/mysql/
# BINARY LOGGING #
server-id = 1
log-bin = /var/lib/mysql/binlog/mysql-bin
expire-logs-days = 14
sync-binlog = 1
# CACHES AND LIMITS #
tmp-table-size = 32M
max-heap-table-size = 32M
query-cache-type = 0
query-cache-size = 0
max-connections = 500
thread-cache-size = 50
open-files-limit = 65535
table-definition-cache = 4096
table-open-cache = 4096
# INNODB #
innodb-flush-method = O_DIRECT
innodb-log-files-in-group = 2
innodb-log-file-size = 512M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table = 1
innodb-buffer-pool-size = 216G
# LOGGING #
log-error = /var/lib/mysql/mysql-error.log
log-queries-not-using-indexes = 1
slow-query-log = 1
slow-query-log-file = /var/lib/mysql/mysql-slow.log
From what I gather the problem is with this line
/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
but I don’t see any problem with it, so I am really at a loss as to how to fix this.