systemctl status mysqld.service shows activatingMySQL not getting started on linuxI can't enable or disable a user service: Failed to execute operation: No such file or directorysystemd says permission denied for /bin/shmysql service restarted during user being connected lead to failing serviceService Start Issue SystemdWhy x0vncserver is not starting at boot?What is the difference between Process: and Main PID: in the output of systemctl status?How can I start systemd service units in order?Why is systemd stopping service immediately after it is started?Nginx service misbehaving, systemd vs upstart?
Smoothness of finite-dimensional functional calculus
What variety is this tomato with long, milky green branches?
What would happen to a modern skyscraper if it rains micro blackholes?
Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?
How to know the difference between two ciphertexts without key stream in stream ciphers
Hiring someone is unethical to Kantians because you're treating them as a means?
Watching something be written to a file live with tail
Have astronauts in space suits ever taken selfies? If so, how?
Is it possible to do 50 km distance without any previous training?
Which models of the Boeing 737 are still in production?
Why doesn't H₄O²⁺ exist?
Languages that we cannot (dis)prove to be Context-Free
Why, historically, did Gödel think CH was false?
How to add double frame in tcolorbox?
Either or Neither in sentence with another negative
How is it possible to have an ability score that is less than 3?
"to be prejudice towards/against someone" vs "to be prejudiced against/towards someone"
Did Shadowfax go to Valinor?
Schoenfled Residua test shows proportionality hazard assumptions holds but Kaplan-Meier plots intersect
Equivalence principle before Einstein
Why are electrically insulating heatsinks so rare? Is it just cost?
What is the word for reserving something for yourself before others do?
Why is 150k or 200k jobs considered good when there's 300k+ births a month?
How does one intimidate enemies without having the capacity for violence?
systemctl status mysqld.service shows activating
MySQL not getting started on linuxI can't enable or disable a user service: Failed to execute operation: No such file or directorysystemd says permission denied for /bin/shmysql service restarted during user being connected lead to failing serviceService Start Issue SystemdWhy x0vncserver is not starting at boot?What is the difference between Process: and Main PID: in the output of systemctl status?How can I start systemd service units in order?Why is systemd stopping service immediately after it is started?Nginx service misbehaving, systemd vs upstart?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have configured MySQL 5.7.25 instance using Linux Generic Binaries on a separate mount point (instead of default locations) on a test server (RHEL 7.4).
The systemd support, in this case, must be manually configured, which I did.
My question is regarding systemctl command.
When I issue systemctl status mysqld.service, the output shows activating (start) but the service is started successfully (at least I think so as per alert logs) and I don't get the prompt back. I have to CTRL+C to get the prompt back.
In the case of other services, systemctl status shows active (started).
Also, systemctl status mysqld.service shows "PID file /usr/local/mysql/data/mysqld.pid not readable (yet?) after start."
The PID gets generated in the defined location as can be seen below in ls -l output.
How do I deal with this?
Following is the output of the systemctl status mysqld.service
> [root@localhost system]# systemctl status mysqld.service ●
> mysqld.service - MySQL Server Loaded: loaded
> (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset:
> disabled) Active: **activating (start)** since Wed 2019-03-27
> 16:58:13 IST; 5min ago
> Docs: man:mysqld(7)
> http://dev.mysql.com/doc/refman/en/using-systemd.html Process: 9307
> ExecStart=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld
> --lc-messages-dir=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/share
> --daemonize --pid-file=/mysql/mysql_data/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS) CGroup:
> /system.slice/mysqld.service
> └─9309 /mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld
> --lc-messages-dir=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/share
> --daemonize --pid-file=/mysql/mysql_data/...
>
> Mar 27 16:58:13 localhost.localdomain systemd[1]: **Starting MySQL
> Server...** Mar 27 16:58:13 localhost.localdomain systemd[1]: **PID
> file /usr/local/mysql/data/mysqld.pid not readable (yet?) after
> start.** [root@localhost system]#
Following is the output of ls -l for the data directory.
[root@localhost mysql_data]# ls -l
total 122964
-rw-r-----. 1 mysql mysql 56 Mar 27 16:14 auto.cnf
-rw-r-----. 1 mysql mysql 283 Mar 27 16:58 ib_buffer_pool
-rw-r-----. 1 mysql mysql 12582912 Mar 27 16:58 ibdata1
-rw-r-----. 1 mysql mysql 50331648 Mar 27 16:58 ib_logfile0
-rw-r-----. 1 mysql mysql 50331648 Mar 27 16:13 ib_logfile1
-rw-r-----. 1 mysql mysql 12582912 Mar 27 16:58 ibtmp1
drwxr-x---. 2 mysql mysql 4096 Mar 27 16:14 mysql
-rw-r-----. 1 mysql mysql 41256 Mar 27 16:58 mysqld.log
-rw-r-----. 1 mysql mysql 5 Mar 27 16:58 mysqld.pid
srwxrwxrwx. 1 mysql mysql 0 Mar 27 16:58 mysql.sock
-rw-------. 1 mysql mysql 5 Mar 27 16:58 mysql.sock.lock
drwxr-x---. 2 mysql mysql 4096 Mar 27 16:14 performance_schema
drwxr-x---. 2 mysql mysql 12288 Mar 27 16:14 sys
[root@localhost mysql_data]#
Following is the /usr/lib/systemd/system/mysqld.service file
> [root@localhost system]# cat mysqld.service [Unit] Description=MySQL
> Server Documentation=man:mysqld(7)
> Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html
> After=network.target After=syslog.target
>
> [Install] WantedBy=multi-user.target
>
> [Service] User=mysql Group=mysql
>
> Type=forking
>
> PIDFile=/usr/local/mysql/data/mysqld.pid
>
> # Disable service start and stop timeout logic of systemd for mysqld service. TimeoutSec=0
>
> # Start main service ExecStart=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld
> --lc-messages-dir=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/share
> --daemonize --pid-file=/mysql/mysql_data/mysqld.pid $MYSQLD_OPTS
>
> # Use this to switch malloc implementation EnvironmentFile=-/etc/sysconfig/mysql
>
> # Sets open_files_limit LimitNOFILE = infinity
>
> Restart=on-failure
>
> RestartPreventExitStatus=1
>
> PrivateTmp=false [root@localhost system]#
Follwing is the alert log file which shows that mysqld is ready for connections.
2019-03-27T11:28:13.334048Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-03-27T11:28:13.335294Z 0 [Note] /mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld (mysqld 5.7.25) starting as process 9309 ...
2019-03-27T11:28:13.337926Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-03-27T11:28:13.337953Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-03-27T11:28:13.337959Z 0 [Note] InnoDB: Uses event mutexes
2019-03-27T11:28:13.337964Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2019-03-27T11:28:13.337969Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-03-27T11:28:13.337974Z 0 [Note] InnoDB: Using Linux native AIO
2019-03-27T11:28:13.338216Z 0 [Note] InnoDB: Number of pools: 1
2019-03-27T11:28:13.338317Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-03-27T11:28:13.339746Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-03-27T11:28:13.351813Z 0 [Note] InnoDB: Completed initialization of buffer pool
2019-03-27T11:28:13.353463Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-03-27T11:28:13.365875Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2019-03-27T11:28:13.380701Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-03-27T11:28:13.380772Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-03-27T11:28:13.417750Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2019-03-27T11:28:13.418493Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2019-03-27T11:28:13.418503Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2019-03-27T11:28:13.418713Z 0 [Note] InnoDB: Waiting for purge to start
2019-03-27T11:28:13.472045Z 0 [Note] InnoDB: 5.7.25 started; log sequence number 2524297
2019-03-27T11:28:13.472824Z 0 [Note] InnoDB: Loading buffer pool(s) from /mysql/mysql_data/ib_buffer_pool
2019-03-27T11:28:13.473297Z 0 [Note] Plugin 'FEDERATED' is disabled.
2019-03-27T11:28:13.474439Z 0 [Note] InnoDB: Buffer pool(s) load completed at 190327 16:58:13
2019-03-27T11:28:13.478030Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2019-03-27T11:28:13.478659Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2019-03-27T11:28:13.478711Z 0 [Note] IPv6 is available.
2019-03-27T11:28:13.478724Z 0 [Note] - '::' resolves to '::';
2019-03-27T11:28:13.478745Z 0 [Note] Server socket created on IP: '::'.
2019-03-27T11:28:13.489601Z 0 [Note] Event Scheduler: Loaded 0 events
2019-03-27T11:28:13.489791Z 0 [Note] **/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld: ready for connections.**
Version: '5.7.25' socket: '/mysql/mysql_data/mysql.sock' port: 3306 MySQL Community Server (GPL)
I have tried the same procedure twice with same issue.
The systemctl status mysqld.service shows activating (start) and does not return the prompt.
I can log in to the database.
systemd mysql systemctl
add a comment |
I have configured MySQL 5.7.25 instance using Linux Generic Binaries on a separate mount point (instead of default locations) on a test server (RHEL 7.4).
The systemd support, in this case, must be manually configured, which I did.
My question is regarding systemctl command.
When I issue systemctl status mysqld.service, the output shows activating (start) but the service is started successfully (at least I think so as per alert logs) and I don't get the prompt back. I have to CTRL+C to get the prompt back.
In the case of other services, systemctl status shows active (started).
Also, systemctl status mysqld.service shows "PID file /usr/local/mysql/data/mysqld.pid not readable (yet?) after start."
The PID gets generated in the defined location as can be seen below in ls -l output.
How do I deal with this?
Following is the output of the systemctl status mysqld.service
> [root@localhost system]# systemctl status mysqld.service ●
> mysqld.service - MySQL Server Loaded: loaded
> (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset:
> disabled) Active: **activating (start)** since Wed 2019-03-27
> 16:58:13 IST; 5min ago
> Docs: man:mysqld(7)
> http://dev.mysql.com/doc/refman/en/using-systemd.html Process: 9307
> ExecStart=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld
> --lc-messages-dir=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/share
> --daemonize --pid-file=/mysql/mysql_data/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS) CGroup:
> /system.slice/mysqld.service
> └─9309 /mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld
> --lc-messages-dir=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/share
> --daemonize --pid-file=/mysql/mysql_data/...
>
> Mar 27 16:58:13 localhost.localdomain systemd[1]: **Starting MySQL
> Server...** Mar 27 16:58:13 localhost.localdomain systemd[1]: **PID
> file /usr/local/mysql/data/mysqld.pid not readable (yet?) after
> start.** [root@localhost system]#
Following is the output of ls -l for the data directory.
[root@localhost mysql_data]# ls -l
total 122964
-rw-r-----. 1 mysql mysql 56 Mar 27 16:14 auto.cnf
-rw-r-----. 1 mysql mysql 283 Mar 27 16:58 ib_buffer_pool
-rw-r-----. 1 mysql mysql 12582912 Mar 27 16:58 ibdata1
-rw-r-----. 1 mysql mysql 50331648 Mar 27 16:58 ib_logfile0
-rw-r-----. 1 mysql mysql 50331648 Mar 27 16:13 ib_logfile1
-rw-r-----. 1 mysql mysql 12582912 Mar 27 16:58 ibtmp1
drwxr-x---. 2 mysql mysql 4096 Mar 27 16:14 mysql
-rw-r-----. 1 mysql mysql 41256 Mar 27 16:58 mysqld.log
-rw-r-----. 1 mysql mysql 5 Mar 27 16:58 mysqld.pid
srwxrwxrwx. 1 mysql mysql 0 Mar 27 16:58 mysql.sock
-rw-------. 1 mysql mysql 5 Mar 27 16:58 mysql.sock.lock
drwxr-x---. 2 mysql mysql 4096 Mar 27 16:14 performance_schema
drwxr-x---. 2 mysql mysql 12288 Mar 27 16:14 sys
[root@localhost mysql_data]#
Following is the /usr/lib/systemd/system/mysqld.service file
> [root@localhost system]# cat mysqld.service [Unit] Description=MySQL
> Server Documentation=man:mysqld(7)
> Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html
> After=network.target After=syslog.target
>
> [Install] WantedBy=multi-user.target
>
> [Service] User=mysql Group=mysql
>
> Type=forking
>
> PIDFile=/usr/local/mysql/data/mysqld.pid
>
> # Disable service start and stop timeout logic of systemd for mysqld service. TimeoutSec=0
>
> # Start main service ExecStart=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld
> --lc-messages-dir=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/share
> --daemonize --pid-file=/mysql/mysql_data/mysqld.pid $MYSQLD_OPTS
>
> # Use this to switch malloc implementation EnvironmentFile=-/etc/sysconfig/mysql
>
> # Sets open_files_limit LimitNOFILE = infinity
>
> Restart=on-failure
>
> RestartPreventExitStatus=1
>
> PrivateTmp=false [root@localhost system]#
Follwing is the alert log file which shows that mysqld is ready for connections.
2019-03-27T11:28:13.334048Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-03-27T11:28:13.335294Z 0 [Note] /mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld (mysqld 5.7.25) starting as process 9309 ...
2019-03-27T11:28:13.337926Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-03-27T11:28:13.337953Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-03-27T11:28:13.337959Z 0 [Note] InnoDB: Uses event mutexes
2019-03-27T11:28:13.337964Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2019-03-27T11:28:13.337969Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-03-27T11:28:13.337974Z 0 [Note] InnoDB: Using Linux native AIO
2019-03-27T11:28:13.338216Z 0 [Note] InnoDB: Number of pools: 1
2019-03-27T11:28:13.338317Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-03-27T11:28:13.339746Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-03-27T11:28:13.351813Z 0 [Note] InnoDB: Completed initialization of buffer pool
2019-03-27T11:28:13.353463Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-03-27T11:28:13.365875Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2019-03-27T11:28:13.380701Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-03-27T11:28:13.380772Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-03-27T11:28:13.417750Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2019-03-27T11:28:13.418493Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2019-03-27T11:28:13.418503Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2019-03-27T11:28:13.418713Z 0 [Note] InnoDB: Waiting for purge to start
2019-03-27T11:28:13.472045Z 0 [Note] InnoDB: 5.7.25 started; log sequence number 2524297
2019-03-27T11:28:13.472824Z 0 [Note] InnoDB: Loading buffer pool(s) from /mysql/mysql_data/ib_buffer_pool
2019-03-27T11:28:13.473297Z 0 [Note] Plugin 'FEDERATED' is disabled.
2019-03-27T11:28:13.474439Z 0 [Note] InnoDB: Buffer pool(s) load completed at 190327 16:58:13
2019-03-27T11:28:13.478030Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2019-03-27T11:28:13.478659Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2019-03-27T11:28:13.478711Z 0 [Note] IPv6 is available.
2019-03-27T11:28:13.478724Z 0 [Note] - '::' resolves to '::';
2019-03-27T11:28:13.478745Z 0 [Note] Server socket created on IP: '::'.
2019-03-27T11:28:13.489601Z 0 [Note] Event Scheduler: Loaded 0 events
2019-03-27T11:28:13.489791Z 0 [Note] **/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld: ready for connections.**
Version: '5.7.25' socket: '/mysql/mysql_data/mysql.sock' port: 3306 MySQL Community Server (GPL)
I have tried the same procedure twice with same issue.
The systemctl status mysqld.service shows activating (start) and does not return the prompt.
I can log in to the database.
systemd mysql systemctl
Path formysqld.pid
in your service showing in/usr/local/mysql/data/
butls -l
showingmysqld.pid
inmysql_data
directory. How ?
– erTugRul
Mar 27 at 12:26
I too am trying to understand that. In mysqld.service file i mentioned path for pid file; ideally it ought to consider this option and it is using the same path.
– Avinash Pawar
Mar 28 at 5:13
add a comment |
I have configured MySQL 5.7.25 instance using Linux Generic Binaries on a separate mount point (instead of default locations) on a test server (RHEL 7.4).
The systemd support, in this case, must be manually configured, which I did.
My question is regarding systemctl command.
When I issue systemctl status mysqld.service, the output shows activating (start) but the service is started successfully (at least I think so as per alert logs) and I don't get the prompt back. I have to CTRL+C to get the prompt back.
In the case of other services, systemctl status shows active (started).
Also, systemctl status mysqld.service shows "PID file /usr/local/mysql/data/mysqld.pid not readable (yet?) after start."
The PID gets generated in the defined location as can be seen below in ls -l output.
How do I deal with this?
Following is the output of the systemctl status mysqld.service
> [root@localhost system]# systemctl status mysqld.service ●
> mysqld.service - MySQL Server Loaded: loaded
> (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset:
> disabled) Active: **activating (start)** since Wed 2019-03-27
> 16:58:13 IST; 5min ago
> Docs: man:mysqld(7)
> http://dev.mysql.com/doc/refman/en/using-systemd.html Process: 9307
> ExecStart=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld
> --lc-messages-dir=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/share
> --daemonize --pid-file=/mysql/mysql_data/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS) CGroup:
> /system.slice/mysqld.service
> └─9309 /mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld
> --lc-messages-dir=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/share
> --daemonize --pid-file=/mysql/mysql_data/...
>
> Mar 27 16:58:13 localhost.localdomain systemd[1]: **Starting MySQL
> Server...** Mar 27 16:58:13 localhost.localdomain systemd[1]: **PID
> file /usr/local/mysql/data/mysqld.pid not readable (yet?) after
> start.** [root@localhost system]#
Following is the output of ls -l for the data directory.
[root@localhost mysql_data]# ls -l
total 122964
-rw-r-----. 1 mysql mysql 56 Mar 27 16:14 auto.cnf
-rw-r-----. 1 mysql mysql 283 Mar 27 16:58 ib_buffer_pool
-rw-r-----. 1 mysql mysql 12582912 Mar 27 16:58 ibdata1
-rw-r-----. 1 mysql mysql 50331648 Mar 27 16:58 ib_logfile0
-rw-r-----. 1 mysql mysql 50331648 Mar 27 16:13 ib_logfile1
-rw-r-----. 1 mysql mysql 12582912 Mar 27 16:58 ibtmp1
drwxr-x---. 2 mysql mysql 4096 Mar 27 16:14 mysql
-rw-r-----. 1 mysql mysql 41256 Mar 27 16:58 mysqld.log
-rw-r-----. 1 mysql mysql 5 Mar 27 16:58 mysqld.pid
srwxrwxrwx. 1 mysql mysql 0 Mar 27 16:58 mysql.sock
-rw-------. 1 mysql mysql 5 Mar 27 16:58 mysql.sock.lock
drwxr-x---. 2 mysql mysql 4096 Mar 27 16:14 performance_schema
drwxr-x---. 2 mysql mysql 12288 Mar 27 16:14 sys
[root@localhost mysql_data]#
Following is the /usr/lib/systemd/system/mysqld.service file
> [root@localhost system]# cat mysqld.service [Unit] Description=MySQL
> Server Documentation=man:mysqld(7)
> Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html
> After=network.target After=syslog.target
>
> [Install] WantedBy=multi-user.target
>
> [Service] User=mysql Group=mysql
>
> Type=forking
>
> PIDFile=/usr/local/mysql/data/mysqld.pid
>
> # Disable service start and stop timeout logic of systemd for mysqld service. TimeoutSec=0
>
> # Start main service ExecStart=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld
> --lc-messages-dir=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/share
> --daemonize --pid-file=/mysql/mysql_data/mysqld.pid $MYSQLD_OPTS
>
> # Use this to switch malloc implementation EnvironmentFile=-/etc/sysconfig/mysql
>
> # Sets open_files_limit LimitNOFILE = infinity
>
> Restart=on-failure
>
> RestartPreventExitStatus=1
>
> PrivateTmp=false [root@localhost system]#
Follwing is the alert log file which shows that mysqld is ready for connections.
2019-03-27T11:28:13.334048Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-03-27T11:28:13.335294Z 0 [Note] /mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld (mysqld 5.7.25) starting as process 9309 ...
2019-03-27T11:28:13.337926Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-03-27T11:28:13.337953Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-03-27T11:28:13.337959Z 0 [Note] InnoDB: Uses event mutexes
2019-03-27T11:28:13.337964Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2019-03-27T11:28:13.337969Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-03-27T11:28:13.337974Z 0 [Note] InnoDB: Using Linux native AIO
2019-03-27T11:28:13.338216Z 0 [Note] InnoDB: Number of pools: 1
2019-03-27T11:28:13.338317Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-03-27T11:28:13.339746Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-03-27T11:28:13.351813Z 0 [Note] InnoDB: Completed initialization of buffer pool
2019-03-27T11:28:13.353463Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-03-27T11:28:13.365875Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2019-03-27T11:28:13.380701Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-03-27T11:28:13.380772Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-03-27T11:28:13.417750Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2019-03-27T11:28:13.418493Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2019-03-27T11:28:13.418503Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2019-03-27T11:28:13.418713Z 0 [Note] InnoDB: Waiting for purge to start
2019-03-27T11:28:13.472045Z 0 [Note] InnoDB: 5.7.25 started; log sequence number 2524297
2019-03-27T11:28:13.472824Z 0 [Note] InnoDB: Loading buffer pool(s) from /mysql/mysql_data/ib_buffer_pool
2019-03-27T11:28:13.473297Z 0 [Note] Plugin 'FEDERATED' is disabled.
2019-03-27T11:28:13.474439Z 0 [Note] InnoDB: Buffer pool(s) load completed at 190327 16:58:13
2019-03-27T11:28:13.478030Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2019-03-27T11:28:13.478659Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2019-03-27T11:28:13.478711Z 0 [Note] IPv6 is available.
2019-03-27T11:28:13.478724Z 0 [Note] - '::' resolves to '::';
2019-03-27T11:28:13.478745Z 0 [Note] Server socket created on IP: '::'.
2019-03-27T11:28:13.489601Z 0 [Note] Event Scheduler: Loaded 0 events
2019-03-27T11:28:13.489791Z 0 [Note] **/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld: ready for connections.**
Version: '5.7.25' socket: '/mysql/mysql_data/mysql.sock' port: 3306 MySQL Community Server (GPL)
I have tried the same procedure twice with same issue.
The systemctl status mysqld.service shows activating (start) and does not return the prompt.
I can log in to the database.
systemd mysql systemctl
I have configured MySQL 5.7.25 instance using Linux Generic Binaries on a separate mount point (instead of default locations) on a test server (RHEL 7.4).
The systemd support, in this case, must be manually configured, which I did.
My question is regarding systemctl command.
When I issue systemctl status mysqld.service, the output shows activating (start) but the service is started successfully (at least I think so as per alert logs) and I don't get the prompt back. I have to CTRL+C to get the prompt back.
In the case of other services, systemctl status shows active (started).
Also, systemctl status mysqld.service shows "PID file /usr/local/mysql/data/mysqld.pid not readable (yet?) after start."
The PID gets generated in the defined location as can be seen below in ls -l output.
How do I deal with this?
Following is the output of the systemctl status mysqld.service
> [root@localhost system]# systemctl status mysqld.service ●
> mysqld.service - MySQL Server Loaded: loaded
> (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset:
> disabled) Active: **activating (start)** since Wed 2019-03-27
> 16:58:13 IST; 5min ago
> Docs: man:mysqld(7)
> http://dev.mysql.com/doc/refman/en/using-systemd.html Process: 9307
> ExecStart=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld
> --lc-messages-dir=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/share
> --daemonize --pid-file=/mysql/mysql_data/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS) CGroup:
> /system.slice/mysqld.service
> └─9309 /mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld
> --lc-messages-dir=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/share
> --daemonize --pid-file=/mysql/mysql_data/...
>
> Mar 27 16:58:13 localhost.localdomain systemd[1]: **Starting MySQL
> Server...** Mar 27 16:58:13 localhost.localdomain systemd[1]: **PID
> file /usr/local/mysql/data/mysqld.pid not readable (yet?) after
> start.** [root@localhost system]#
Following is the output of ls -l for the data directory.
[root@localhost mysql_data]# ls -l
total 122964
-rw-r-----. 1 mysql mysql 56 Mar 27 16:14 auto.cnf
-rw-r-----. 1 mysql mysql 283 Mar 27 16:58 ib_buffer_pool
-rw-r-----. 1 mysql mysql 12582912 Mar 27 16:58 ibdata1
-rw-r-----. 1 mysql mysql 50331648 Mar 27 16:58 ib_logfile0
-rw-r-----. 1 mysql mysql 50331648 Mar 27 16:13 ib_logfile1
-rw-r-----. 1 mysql mysql 12582912 Mar 27 16:58 ibtmp1
drwxr-x---. 2 mysql mysql 4096 Mar 27 16:14 mysql
-rw-r-----. 1 mysql mysql 41256 Mar 27 16:58 mysqld.log
-rw-r-----. 1 mysql mysql 5 Mar 27 16:58 mysqld.pid
srwxrwxrwx. 1 mysql mysql 0 Mar 27 16:58 mysql.sock
-rw-------. 1 mysql mysql 5 Mar 27 16:58 mysql.sock.lock
drwxr-x---. 2 mysql mysql 4096 Mar 27 16:14 performance_schema
drwxr-x---. 2 mysql mysql 12288 Mar 27 16:14 sys
[root@localhost mysql_data]#
Following is the /usr/lib/systemd/system/mysqld.service file
> [root@localhost system]# cat mysqld.service [Unit] Description=MySQL
> Server Documentation=man:mysqld(7)
> Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html
> After=network.target After=syslog.target
>
> [Install] WantedBy=multi-user.target
>
> [Service] User=mysql Group=mysql
>
> Type=forking
>
> PIDFile=/usr/local/mysql/data/mysqld.pid
>
> # Disable service start and stop timeout logic of systemd for mysqld service. TimeoutSec=0
>
> # Start main service ExecStart=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld
> --lc-messages-dir=/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/share
> --daemonize --pid-file=/mysql/mysql_data/mysqld.pid $MYSQLD_OPTS
>
> # Use this to switch malloc implementation EnvironmentFile=-/etc/sysconfig/mysql
>
> # Sets open_files_limit LimitNOFILE = infinity
>
> Restart=on-failure
>
> RestartPreventExitStatus=1
>
> PrivateTmp=false [root@localhost system]#
Follwing is the alert log file which shows that mysqld is ready for connections.
2019-03-27T11:28:13.334048Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-03-27T11:28:13.335294Z 0 [Note] /mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld (mysqld 5.7.25) starting as process 9309 ...
2019-03-27T11:28:13.337926Z 0 [Note] InnoDB: PUNCH HOLE support available
2019-03-27T11:28:13.337953Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-03-27T11:28:13.337959Z 0 [Note] InnoDB: Uses event mutexes
2019-03-27T11:28:13.337964Z 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2019-03-27T11:28:13.337969Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-03-27T11:28:13.337974Z 0 [Note] InnoDB: Using Linux native AIO
2019-03-27T11:28:13.338216Z 0 [Note] InnoDB: Number of pools: 1
2019-03-27T11:28:13.338317Z 0 [Note] InnoDB: Using CPU crc32 instructions
2019-03-27T11:28:13.339746Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2019-03-27T11:28:13.351813Z 0 [Note] InnoDB: Completed initialization of buffer pool
2019-03-27T11:28:13.353463Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-03-27T11:28:13.365875Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2019-03-27T11:28:13.380701Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-03-27T11:28:13.380772Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-03-27T11:28:13.417750Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2019-03-27T11:28:13.418493Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2019-03-27T11:28:13.418503Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2019-03-27T11:28:13.418713Z 0 [Note] InnoDB: Waiting for purge to start
2019-03-27T11:28:13.472045Z 0 [Note] InnoDB: 5.7.25 started; log sequence number 2524297
2019-03-27T11:28:13.472824Z 0 [Note] InnoDB: Loading buffer pool(s) from /mysql/mysql_data/ib_buffer_pool
2019-03-27T11:28:13.473297Z 0 [Note] Plugin 'FEDERATED' is disabled.
2019-03-27T11:28:13.474439Z 0 [Note] InnoDB: Buffer pool(s) load completed at 190327 16:58:13
2019-03-27T11:28:13.478030Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2019-03-27T11:28:13.478659Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2019-03-27T11:28:13.478711Z 0 [Note] IPv6 is available.
2019-03-27T11:28:13.478724Z 0 [Note] - '::' resolves to '::';
2019-03-27T11:28:13.478745Z 0 [Note] Server socket created on IP: '::'.
2019-03-27T11:28:13.489601Z 0 [Note] Event Scheduler: Loaded 0 events
2019-03-27T11:28:13.489791Z 0 [Note] **/mysql/mysql_install/mysql-5.7.25-linux-glibc2.12-x86_64/bin/mysqld: ready for connections.**
Version: '5.7.25' socket: '/mysql/mysql_data/mysql.sock' port: 3306 MySQL Community Server (GPL)
I have tried the same procedure twice with same issue.
The systemctl status mysqld.service shows activating (start) and does not return the prompt.
I can log in to the database.
systemd mysql systemctl
systemd mysql systemctl
edited Mar 28 at 0:44
Rui F Ribeiro
41.9k1483142
41.9k1483142
asked Mar 27 at 11:55
Avinash PawarAvinash Pawar
155
155
Path formysqld.pid
in your service showing in/usr/local/mysql/data/
butls -l
showingmysqld.pid
inmysql_data
directory. How ?
– erTugRul
Mar 27 at 12:26
I too am trying to understand that. In mysqld.service file i mentioned path for pid file; ideally it ought to consider this option and it is using the same path.
– Avinash Pawar
Mar 28 at 5:13
add a comment |
Path formysqld.pid
in your service showing in/usr/local/mysql/data/
butls -l
showingmysqld.pid
inmysql_data
directory. How ?
– erTugRul
Mar 27 at 12:26
I too am trying to understand that. In mysqld.service file i mentioned path for pid file; ideally it ought to consider this option and it is using the same path.
– Avinash Pawar
Mar 28 at 5:13
Path for
mysqld.pid
in your service showing in /usr/local/mysql/data/
but ls -l
showing mysqld.pid
in mysql_data
directory. How ?– erTugRul
Mar 27 at 12:26
Path for
mysqld.pid
in your service showing in /usr/local/mysql/data/
but ls -l
showing mysqld.pid
in mysql_data
directory. How ?– erTugRul
Mar 27 at 12:26
I too am trying to understand that. In mysqld.service file i mentioned path for pid file; ideally it ought to consider this option and it is using the same path.
– Avinash Pawar
Mar 28 at 5:13
I too am trying to understand that. In mysqld.service file i mentioned path for pid file; ideally it ought to consider this option and it is using the same path.
– Avinash Pawar
Mar 28 at 5:13
add a comment |
1 Answer
1
active
oldest
votes
From your output:
ExecStart=...mysqld ... --pid-file=/mysql/mysql_data/mysqld.pid ...
... does not match what you're asking systemd to watch:
PIDFile=/usr/local/mysql/data/mysqld.pid
correct one of those two, and you'll be in much better shape.
Well i am really sorry. it was sheer folly on my part. i didn't pay enough attention to the mysqld.service file. Thanks Jeff Schaller.
– Avinash Pawar
Mar 28 at 5:32
Sometimes it just takes a second pair of eyes! Happy it helped; if this solved your problem, please click the check mark next to it to indicate to the system that this question has been answered; thank you!
– Jeff Schaller♦
Mar 28 at 9:50
1
yes I tried it and systemctl status shows as active :-) happy. Thanks again.
– Avinash Pawar
Mar 28 at 14:12
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508961%2fsystemctl-status-mysqld-service-shows-activating%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
From your output:
ExecStart=...mysqld ... --pid-file=/mysql/mysql_data/mysqld.pid ...
... does not match what you're asking systemd to watch:
PIDFile=/usr/local/mysql/data/mysqld.pid
correct one of those two, and you'll be in much better shape.
Well i am really sorry. it was sheer folly on my part. i didn't pay enough attention to the mysqld.service file. Thanks Jeff Schaller.
– Avinash Pawar
Mar 28 at 5:32
Sometimes it just takes a second pair of eyes! Happy it helped; if this solved your problem, please click the check mark next to it to indicate to the system that this question has been answered; thank you!
– Jeff Schaller♦
Mar 28 at 9:50
1
yes I tried it and systemctl status shows as active :-) happy. Thanks again.
– Avinash Pawar
Mar 28 at 14:12
add a comment |
From your output:
ExecStart=...mysqld ... --pid-file=/mysql/mysql_data/mysqld.pid ...
... does not match what you're asking systemd to watch:
PIDFile=/usr/local/mysql/data/mysqld.pid
correct one of those two, and you'll be in much better shape.
Well i am really sorry. it was sheer folly on my part. i didn't pay enough attention to the mysqld.service file. Thanks Jeff Schaller.
– Avinash Pawar
Mar 28 at 5:32
Sometimes it just takes a second pair of eyes! Happy it helped; if this solved your problem, please click the check mark next to it to indicate to the system that this question has been answered; thank you!
– Jeff Schaller♦
Mar 28 at 9:50
1
yes I tried it and systemctl status shows as active :-) happy. Thanks again.
– Avinash Pawar
Mar 28 at 14:12
add a comment |
From your output:
ExecStart=...mysqld ... --pid-file=/mysql/mysql_data/mysqld.pid ...
... does not match what you're asking systemd to watch:
PIDFile=/usr/local/mysql/data/mysqld.pid
correct one of those two, and you'll be in much better shape.
From your output:
ExecStart=...mysqld ... --pid-file=/mysql/mysql_data/mysqld.pid ...
... does not match what you're asking systemd to watch:
PIDFile=/usr/local/mysql/data/mysqld.pid
correct one of those two, and you'll be in much better shape.
answered Mar 27 at 12:56
Jeff Schaller♦Jeff Schaller
44.7k1163145
44.7k1163145
Well i am really sorry. it was sheer folly on my part. i didn't pay enough attention to the mysqld.service file. Thanks Jeff Schaller.
– Avinash Pawar
Mar 28 at 5:32
Sometimes it just takes a second pair of eyes! Happy it helped; if this solved your problem, please click the check mark next to it to indicate to the system that this question has been answered; thank you!
– Jeff Schaller♦
Mar 28 at 9:50
1
yes I tried it and systemctl status shows as active :-) happy. Thanks again.
– Avinash Pawar
Mar 28 at 14:12
add a comment |
Well i am really sorry. it was sheer folly on my part. i didn't pay enough attention to the mysqld.service file. Thanks Jeff Schaller.
– Avinash Pawar
Mar 28 at 5:32
Sometimes it just takes a second pair of eyes! Happy it helped; if this solved your problem, please click the check mark next to it to indicate to the system that this question has been answered; thank you!
– Jeff Schaller♦
Mar 28 at 9:50
1
yes I tried it and systemctl status shows as active :-) happy. Thanks again.
– Avinash Pawar
Mar 28 at 14:12
Well i am really sorry. it was sheer folly on my part. i didn't pay enough attention to the mysqld.service file. Thanks Jeff Schaller.
– Avinash Pawar
Mar 28 at 5:32
Well i am really sorry. it was sheer folly on my part. i didn't pay enough attention to the mysqld.service file. Thanks Jeff Schaller.
– Avinash Pawar
Mar 28 at 5:32
Sometimes it just takes a second pair of eyes! Happy it helped; if this solved your problem, please click the check mark next to it to indicate to the system that this question has been answered; thank you!
– Jeff Schaller♦
Mar 28 at 9:50
Sometimes it just takes a second pair of eyes! Happy it helped; if this solved your problem, please click the check mark next to it to indicate to the system that this question has been answered; thank you!
– Jeff Schaller♦
Mar 28 at 9:50
1
1
yes I tried it and systemctl status shows as active :-) happy. Thanks again.
– Avinash Pawar
Mar 28 at 14:12
yes I tried it and systemctl status shows as active :-) happy. Thanks again.
– Avinash Pawar
Mar 28 at 14:12
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508961%2fsystemctl-status-mysqld-service-shows-activating%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
-mysql, systemctl, systemd
Path for
mysqld.pid
in your service showing in/usr/local/mysql/data/
butls -l
showingmysqld.pid
inmysql_data
directory. How ?– erTugRul
Mar 27 at 12:26
I too am trying to understand that. In mysqld.service file i mentioned path for pid file; ideally it ought to consider this option and it is using the same path.
– Avinash Pawar
Mar 28 at 5:13