Not the answer you need?
Register and ask your own question!

new installation on CentOS 7 systemctl startup order?

rhawk301rhawk301 Current User Role Novice

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.

Answers

  • Evgeniy PatlanEvgeniy Patlan Percona Percona Staff Role

    Hi @rhawk301

    I tried to reproduce your issue but without success.

    Both mysql and mysqld worked well. Please see below:


    [[email protected] ~]$ sudo service mysql start

    Redirecting to /bin/systemctl start mysql.service

    [[email protected] ~]$ 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)

              http://dev.mysql.com/doc/refman/en/using-systemd.html


     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.

    [[email protected] ~]$ sudo service mysql stop

    Redirecting to /bin/systemctl stop mysql.service

    [[email protected] ~]$ sudo service mysqld start

    Redirecting to /bin/systemctl start mysqld.service

    [[email protected] ~]$ 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)

              http://dev.mysql.com/doc/refman/en/using-systemd.html


     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.

    [[email protected] ~]$ sudo service mysqld stop

    Redirecting to /bin/systemctl stop mysqld.service

    [[email protected] ~]$

Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.