new installation on CentOS 7 systemctl startup order?

I installed 5.7 new on a CentOS 7 platform, which is new for me.

It created a mysql and mysqld systemctl startup script.

One of them fails, when the other one is started up.

What is the proper order when starting mysql? “systemctl start mysql” or “systemctl start mysqld” does one or the other have to be disabled? I had to disable one of them, because of this.

Strange this would happen on a fresh installation, but I wanted to get an idea of perhaps I did something wrong or not. Pretty much very basic installation. In fact, I installed it on a new machines just to verify and it did the same thing.

Mysql/Persona process mysqld does in fact start, its just the second iteration of the script that seems to fail.

thanks.

Hi @rhawk301

I tried to reproduce your issue but without success.

Both mysql and mysqld worked well. Please see below:

[vagrant@localhost ~]$ sudo service mysql start

Redirecting to /bin/systemctl start mysql.service

[vagrant@localhost ~]$ sudo service mysql status

Redirecting to /bin/systemctl status mysql.service

mysqld.service - MySQL Server

Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)

Active: active (running) since Thu 2020-10-22 12:07:41 UTC; 3s ago

Docs: man:mysqld(8)

      <a href="http://dev.mysql.com/doc/refman/en/using-systemd.html">http://dev.mysql.com/doc/refman/en/using-systemd.html</a>

Process: 2515 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCES

S)

Process: 2457 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)

Main PID: 2518 (mysqld)

CGroup: /system.slice/mysqld.service

      └─2518 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

Oct 22 12:07:37 localhost.localdomain systemd[1]: Starting MySQL Server…

Oct 22 12:07:41 localhost.localdomain systemd[1]: Started MySQL Server.

[vagrant@localhost ~]$ sudo service mysql stop

Redirecting to /bin/systemctl stop mysql.service

[vagrant@localhost ~]$ sudo service mysqld start

Redirecting to /bin/systemctl start mysqld.service

[vagrant@localhost ~]$ sudo service mysqld status

Redirecting to /bin/systemctl status mysqld.service

mysqld.service - MySQL Server

Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)

Active: active (running) since Thu 2020-10-22 12:08:11 UTC; 2s ago

Docs: man:mysqld(8)

      <a href="http://dev.mysql.com/doc/refman/en/using-systemd.html">http://dev.mysql.com/doc/refman/en/using-systemd.html</a>

Process: 2651 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCES

S)

Process: 2627 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)

Main PID: 2654 (mysqld)

CGroup: /system.slice/mysqld.service

      └─2654 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

Oct 22 12:08:11 localhost.localdomain systemd[1]: Starting MySQL Server…

Oct 22 12:08:11 localhost.localdomain systemd[1]: Started MySQL Server.

[vagrant@localhost ~]$ sudo service mysqld stop

Redirecting to /bin/systemctl stop mysqld.service

[vagrant@localhost ~]$