# mysql works but systemd status shows it failed after bootstraping

**URL:** https://forums.percona.com/t/mysql-works-but-systemd-status-shows-it-failed-after-bootstraping/4904
**Category:** Percona XtraDB Cluster 5.x
**Created:** [May 24, 2016, 11:32pm UTC](https://forums.percona.com/t/mysql-works-but-systemd-status-shows-it-failed-after-bootstraping/4904 "2016-05-24T23:32:13Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Ara4Sh](https://avatars.discourse-cdn.com/v4/letter/a/c57346/32.png) [@Ara4Sh](https://forums.percona.com/u/Ara4Sh)
#### Post date: [May 24, 2016, 11:32pm UTC](https://forums.percona.com/t/mysql-works-but-systemd-status-shows-it-failed-after-bootstraping/4904/1 "2016-05-24T23:32:13Z")

</div>

Hello

Recently I noticed mysql failed after bootstraping on a fresh cluster so I checked /etc/init.d/mysql status

```auto

● mysql.service - LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon
Loaded: loaded (/etc/init.d/mysql)
Active: failed (Result: exit-code) since Tue 2016-05-24 22:37:02 IRDT; 14h ago
Process: 2313 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)

May 24 22:37:02 1-dbpool-a01 mysql[2313]: Starting MySQL (Percona Xtr...
May 24 22:37:02 1-dbpool-a01 mysql[2313]: failed!
May 24 22:37:02 1-dbpool-a01 systemd[1]: mysql.service: control proc...1
May 24 22:37:02 1-dbpool-a01 systemd[1]: Failed to start LSB: Start ....
May 24 22:37:02 1-dbpool-a01 systemd[1]: Unit mysql.service entered ....
Hint: Some lines were ellipsized, use -l to show in full.

```

I checked the error file and no error detected and I loged in to mysql and all works with no errors

so whats wrong with init script ? where is problem ? how can I find why service failed ?

```auto

Distributor ID: Debian
Description: Debian GNU/Linux 8.4 (jessie)
Release: 8.4
Codename: jessie

Linux 1-vm-dbpool-a01 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-1 (2016-03-06) x86_64 GNU/Linux

mysql Ver 14.14 Distrib 5.6.29-76.2, for debian-linux-gnu (x86_64) using 6.3

ii percona-release 0.1-3.jessie all Package to install Percona gpg key and APT repo
ii percona-xtrabackup 2.3.4-1.jessie amd64 Open source backup tool for InnoDB and XtraDB
ii percona-xtradb-cluster-56 5.6.29-25.15-1.jessie amd64 Percona XtraDB Cluster with Galera
ii percona-xtradb-cluster-client-5.6 5.6.29-25.15-1.jessie amd64 Percona XtraDB Cluster database client binaries
ii percona-xtradb-cluster-common-5.6 5.6.29-25.15-1.jessie amd64 Percona XtraDB Cluster database common files (e.g. /etc/mysql/my.cnf)
ii percona-xtradb-cluster-galera-3 3.15-1.jessie amd64 Metapackage for latest version of galera3.
ii percona-xtradb-cluster-galera-3.x 3.15-1.jessie amd64 Galera components of Percona XtraDB Cluster
ii percona-xtradb-cluster-server-5.6 5.6.29-25.15-1.jessie amd64 Percona XtraDB Cluster database server binaries

```

if you need further information let me know  
thank you

---

<div class="post-metadata">

### Author: ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)
#### Post date: [May 26, 2016, 2:21am UTC](https://forums.percona.com/t/mysql-works-but-systemd-status-shows-it-failed-after-bootstraping/4904/2 "2016-05-26T02:21:12Z")

</div>

How are you bootstrapping the mysqld? Are you doing something like:

```auto
systemctl start mysql&#64;bootstrap.service 

```

---

<div class="post-metadata">

### Author: ![Ara4Sh](https://avatars.discourse-cdn.com/v4/letter/a/c57346/32.png) [@Ara4Sh](https://forums.percona.com/u/Ara4Sh)
#### Post date: [May 31, 2016, 8:12am UTC](https://forums.percona.com/t/mysql-works-but-systemd-status-shows-it-failed-after-bootstraping/4904/3 "2016-05-31T08:12:40Z")

</div>

> [@jrivera;44357](#):
>
> How are you bootstrapping the mysqld? Are you doing something like:
> 
> ```auto
> systemctl start mysql&#64;bootstrap.service 
> 
> ```

no im using init script

```auto
/etc/init.d/mysql bootstrap-pxc

```

---

<div class="post-metadata">

### Author: ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)
#### Post date: [May 31, 2016, 3:48pm UTC](https://forums.percona.com/t/mysql-works-but-systemd-status-shows-it-failed-after-bootstraping/4904/4 "2016-05-31T15:48:25Z")

</div>

Your operating system uses systemd so I’d suggest you bootstrap the node with systemctl start [mysql&#64;bootstrap.servic](mailto:mysql&#64;bootstrap.servic)e.

---

<div class="post-metadata">

### Author: ![Ara4Sh](https://avatars.discourse-cdn.com/v4/letter/a/c57346/32.png) [@Ara4Sh](https://forums.percona.com/u/Ara4Sh)
#### Post date: [July 19, 2016, 6:28am UTC](https://forums.percona.com/t/mysql-works-but-systemd-status-shows-it-failed-after-bootstraping/4904/5 "2016-07-19T06:28:02Z")

</div>

> [@jrivera;44423](#):
>
> Your operating system uses systemd so I’d suggest you bootstrap the node with systemctl start [mysql&#64;bootstrap.servic](mailto:mysql&#64;bootstrap.servic)e.

unfortunately there is no [mysql&#64;bootstrap.servic](mailto:mysql&#64;bootstrap.servic)e in debian jessie

```auto
Failed to start mysql&#64;bootstrap.service: Unit mysql&#64;bootstrap.service faile
d to load: No such file or directory.

```

in [documents](https://www.percona.com/doc/percona-xtradb-cluster/5.6/manual/bootstrap.html):

> [@](#):
>
> Note  
> On CentOS/RHEL 7 following bootstrap command should be used

so i think if I bootstrap new cluster with init script again problem shows up

---

<div class="post-metadata">

### Author: ![sherbin.george](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sherbin.george](https://forums.percona.com/u/sherbin.george)
#### Post date: [March 26, 2018, 1:30pm UTC](https://forums.percona.com/t/mysql-works-but-systemd-status-shows-it-failed-after-bootstraping/4904/6 "2018-03-26T13:30:22Z")

</div>

Hello,

I am facing the same issue mentioned here. Mysql seems to be working fine. But when tried to view the status of mysql.service, it seems that systemctl doesn’t track the service correctly.

=========================

# ps aux |grep mysql

root 21545 0.0 0.0 14224 980 pts/0 S+ 14:57 0:00 grep --color=auto mysql  
root 111572 0.0 0.0 4504 1672 ? S Mar21 0:00 /bin/sh /usr/bin/mysqld\_safe  
mysql 112091 84.3 38.5 29589304 12694008 ? Sl Mar21 6020:06 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --wsrep-provider=/usr/lib/libgalera\_smm.so --log-error=/var/log/mysql/error.log --pid-file=\*\*\*\*.pid --wsrep\_start\_position=af573a98-7fe7-11e7-873e-767a3c4c936b:52906227

# mysql

ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NO)

# systemctl status mysql.service

● mysql.service - LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon  
Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled)  
Active: failed (Result: exit-code) since Mon 2018-03-26 14:42:06 EDT; 16min ago  
Docs: man:systemd-sysv-generator(8)  
Process: 12139 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)  
Tasks: 114  
Memory: 12.6G  
CPU: 12min 21.775s  
CGroup: /system.slice/mysql.service  
├─111572 /bin/sh /usr/bin/mysqld\_safe  
└─112091 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --wsrep-provider=/usr/lib/libgalera\_smm.so --log-error=/var/log/mysql/error.log

# Mar 26 14:42:05 fhm001 systemd[1]: Starting LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon… Mar 26 14:42:05 fhm001 mysql[12139]: \* Starting MySQL (Percona XtraDB Cluster) database server mysqld Mar 26 14:42:05 fhm001 mysql[12139]: \* Stale PID file found: /var/lib/mysql/fhm001.pid with 112091 Mar 26 14:42:06 fhm001 mysql[12139]: \* Please take a look at the syslog. Mar 26 14:42:06 fhm001 mysql[12139]: …fail! Mar 26 14:42:06 fhm001 systemd[1]: mysql.service: Control process exited, code=exited status=1 Mar 26 14:42:06 fhm001 systemd[1]: Failed to start LSB: Start and stop the mysql (Percona XtraDB Cluster) daemon. Mar 26 14:42:06 fhm001 systemd[1]: mysql.service: Unit entered failed state. Mar 26 14:42:06 fhm001 systemd[1]: mysql.service: Failed with result ‘exit-code’.

Looking for some workaround on this one. We have gone for Percona upgrade recently. Not sure if it’s been the cause of this strange issue.

# mysql -V

mysql Ver 14.14 Distrib 5.7.20-18, for debian-linux-gnu (x86\_64) using 6.3
