各位,
我在Windows8上运行Windows8以供个人(随意)使用。当我关闭我的MySQL计算机时,我试图确定是否有一种方法可以自动、干净地关闭Windows8。理想情况下,Windows应该作为OS关闭序列的一部分自动停止MySQL服务。但我不确定这是否真的发生了。任何关于这个主题的想法/想法/建议都将不胜感激!
附加信息:目前,我正在使用.bat脚本在mysql服务上执行"net stop“操作。我在关闭计算机之前手动调用这个.bat脚本。
谢谢。
发布于 2015-01-09 17:53:44
如果您想手动控制这一点,下面是一些建议
以管理员身份登录到窗口命令行Shell并运行以下命令行
C:\> net stop mysql当提示返回时,MySQL已关闭。
如果关闭Windows,MySQL关闭的唯一证据将出现在错误日志中。
在我的笔记本上
12/17/2014 11:09 AM 83,010 ROLAED3573-NYTD.errnet stop mysql01/09/2015 02:02 PM 83,304 ROLAED3573-NYTD.err根据我的操作,MySQL关机在错误日志的末尾写入了294字节。它写了什么?
150109 14:02:33 [Note] MySQL: Normal shutdown
150109 14:02:33 [Note] Event Scheduler: Purging the queue. 0 events
150109 14:02:33 InnoDB: Starting shutdown...
150109 14:02:34 InnoDB: Shutdown completed; log sequence number 10001663889
150109 14:02:34 [Note] MySQL: Shutdown complete考虑到这个输出,我希望在错误日志结束时关闭这些行。
我刚查了这个
C:\MySQL_5.5.37\data>net start mysql
The MySQL service is starting.
The MySQL service was started successfully.
C:\MySQL_5.5.37\data>错误日志显示01/09/2015 02:34 PM 84,289 ROLAED3573-NYTD.err
它落在文件的底部。
150109 14:34:48 [Note] Plugin 'FEDERATED' is disabled.
150109 14:34:48 InnoDB: The InnoDB memory heap is disabled
150109 14:34:48 InnoDB: Mutexes and rw_locks use Windows interlocked functions
150109 14:34:48 InnoDB: Compressed tables use zlib 1.2.3
150109 14:34:48 InnoDB: Initializing buffer pool, size = 1.0G
150109 14:34:48 InnoDB: Completed initialization of buffer pool
150109 14:34:48 InnoDB: highest supported file format is Barracuda.
150109 14:34:48 InnoDB: Waiting for the background threads to start
150109 14:34:49 InnoDB: 5.5.37 started; log sequence number 10001663889
150109 14:34:49 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150109 14:34:49 [Note] - '0.0.0.0' resolves to '0.0.0.0';
150109 14:34:49 [Note] Server socket created on IP: '0.0.0.0'.
150109 14:34:50 [Note] Event Scheduler: Loaded 0 events
150109 14:34:50 [Note] MySQL: ready for connections.
Version: '5.5.37-log' socket: '' port: 3306 MySQL Community Server (GPL)我已经关机了
我启动了笔记本电脑
错误日志显示01/09/2015 02:40 PM 85,568 ROLAED3573-NYTD.err
这次写的是什么?
150109 14:39:13 [Note] MySQL: Normal shutdown
150109 14:39:13 [Note] Event Scheduler: Purging the queue. 0 events
150109 14:39:13 InnoDB: Starting shutdown...
150109 14:39:13 InnoDB: Shutdown completed; log sequence number 10001663889
150109 14:39:13 [Note] MySQL: Shutdown complete
150109 14:40:04 [Note] Plugin 'FEDERATED' is disabled.
150109 14:40:04 InnoDB: The InnoDB memory heap is disabled
150109 14:40:04 InnoDB: Mutexes and rw_locks use Windows interlocked functions
150109 14:40:04 InnoDB: Compressed tables use zlib 1.2.3
150109 14:40:04 InnoDB: Initializing buffer pool, size = 1.0G
150109 14:40:04 InnoDB: Completed initialization of buffer pool
150109 14:40:04 InnoDB: highest supported file format is Barracuda.
150109 14:40:05 InnoDB: Waiting for the background threads to start
150109 14:40:06 InnoDB: 5.5.37 started; log sequence number 10001663889
150109 14:40:06 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150109 14:40:06 [Note] - '0.0.0.0' resolves to '0.0.0.0';
150109 14:40:06 [Note] Server socket created on IP: '0.0.0.0'.
150109 14:40:06 [Note] Event Scheduler: Loaded 0 events
150109 14:40:06 [Note] MySQL: ready for connections.
Version: '5.5.37-log' socket: '' port: 3306 MySQL Community Server (GPL)如错误日志末尾所示,它在下午2:39执行了干净的关闭操作。当Windows启动时,MySQL又出现了。
https://dba.stackexchange.com/questions/88956
复制相似问题