I am running centOS 7 server on a VPS and trying to stop mysqld.
It is empty and nothing in it.
I am able stop it shortly, but after about 10 to 20 seconds, it is restarted automatically!

None of these ways permanently works!
I have root access.

# mysqladmin -u root -p shutdown
# /bin/systemctl stop mysqld.service
# killall -KILL mysql mysqld_safe mysqld
# mysql --version
mysql  Ver 15.1 Distrib 5.5.63-MariaDB, for Linux (x86_64) using readline 5.1

and /var/lib/mysql error log

190520 20:46:06 mysqld_safe mysqld from pid file /var/lib/mysql/server.shakiba.it.pid ended
190520 20:47:01 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
190520 20:47:01 [Note] /usr/sbin/mysqld (mysqld 5.5.63-MariaDB) starting as process 30381 ...
190520 20:47:01 InnoDB: The InnoDB memory heap is disabled
190520 20:47:01 InnoDB: Mutexes and rw_locks use GCC atomic builtins
190520 20:47:01 InnoDB: Compressed tables use zlib 1.2.7
190520 20:47:01 InnoDB: Using Linux native AIO
190520 20:47:01 InnoDB: Initializing buffer pool, size = 128.0M
190520 20:47:01 InnoDB: Completed initialization of buffer pool
190520 20:47:01 InnoDB: highest supported file format is Barracuda.
190520 20:47:02  InnoDB: Waiting for the background threads to start
190520 20:47:03 Percona XtraDB (http://www.percona.com) 5.5.61-MariaDB-38.13 started; log sequence number 2746956
190520 20:47:03 [Note] Plugin 'FEEDBACK' is disabled.
190520 20:47:03 [Note] Server socket created on IP: ''.
190520 20:47:03 [Note] Event Scheduler: Loaded 0 events
190520 20:47:03 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.63-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
  • After the systemctl stop you also need to do systemctl disable so it won't restart later. – chicks May 21 '19 at 13:20
  • @chicks. I tested. Did not work. It was came up again! – Shakiba Moshiri May 21 '19 at 14:17

Since I had root access on the Server (VPS) I did not think that Direct-Admin can reject the root command, but it did.

In Service Monitor section in DA, we can stop / start mysqld. That is it.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.