我在跑步centOS 7VPS 上的服务器并尝试停止mysqld
。
它是空的,里面什么都没有。
我很快就能停止它,但大约 10 到 20 秒后,它会自动重新启动!
这些方法都行不通永久有效!
我有 root 权限。
# 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
和/var/lib/mysql
错误日志
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: '0.0.0.0'.
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
答案1
由于我有权root
访问服务器(VPS),所以我不认为直接管理可以拒绝该root
命令,但是它确实拒绝了。
在服务监控在 DA 部分,我们可以停止/启动mysqld
。就是这样。