您应该如何从 Cygwin 更快地关闭 mysqld(而不在任务管理器中终止进程)并防止这些错误?
我是这样开始的:
$ /usr/bin/mysqld_safe &
[1] 4440
Chloe@xps ~
$ 130809 17:27:09 mysqld_safe Logging to '/var/lib/mysql/xps.err'.
chown: invalid user: `mysql'
130809 17:27:10 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
当我尝试关闭它时,它会永远打印出来并且不会响应 ^C:
$ /usr/sbin/mysqld.exe shutdown
130809 17:29:26 [Warning] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
130809 17:29:26 [Note] Plugin 'FEDERATED' is disabled.
130809 17:29:26 InnoDB: The InnoDB memory heap is disabled
130809 17:29:26 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130809 17:29:26 InnoDB: Compressed tables use zlib 1.2.7
130809 17:29:26 InnoDB: Initializing buffer pool, size = 128.0M
130809 17:29:26 InnoDB: Completed initialization of buffer pool
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
130809 17:29:26 InnoDB: Retrying to lock the first data file
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
在重复打印这些错误 3 分钟后,它终于假装关闭,但它并没有真正关闭,因为它仍在任务管理器和 ps 列表中。我不认为应该花那么长时间。
130809 17:31:06 [Note] /usr/sbin/mysqld: Shutdown complete
我也试过
$ mysqladmin shutdown
但这似乎挂起。