0

背景: 这个问题是我在过去一周在这里发布的另外两个问题的后续问题。在学习 MySQL 并尝试获取 Python 股票信息抓取程序以将数据输入 MySQL 模式(数据库、表)的 2-3 周过程中,我在连接方面遇到了严重困难。我相信我现在已经发现了问题的根源。在我的 Python 脚本和 MySQL 表之间的通信过程中似乎发生了一些事情。我会进一步研究这个;但是,与此同时,在运行 Python 脚本后,我刷新了 MySQL 表以确认数据已成功写入;那时,我收到消息称与数据库的通信链接已损坏。检查 Windows 服务表明相应的服务已停止。尝试重新启动 Windows 服务导致

  1. 消息说服务正在启动,然后是
  2. 消息说“开始挂起”,然后
  3. 消息说“服务已停止。(我是凭记忆写的,所以措辞不准确)

我花了 20-30 分钟从 Workbench 中尝试各种重新启动方法,并专注于 Windows 服务,但无济于事。最后,我在关闭所有打开的应用程序后完全重启了我的电脑。完全重启后,一切恢复正常。MySQL Windows 服务正在“运行”,并且与 MySQL 数据库重新建立了通信。

所以,真正的问题是:
关闭我的计算机并重新启动是重新建立通信的唯一方法,还是有一种不那么激烈的方法?

我的设置参数非常普通,除了我将 MySQL 程序放在我的 D:驱动器而不是 C:驱动器(为操作系统保留的 SSD)上。

系统: Windows 8 64bit,Xeon Ivy Bridge 处理器,大容量 SSD,大容量 HD,mucho RAM,双 X-fired 显卡,ASUS Sabertooth MB(一年前自建)

软件: MySQL 5.7,除了 Visual Basic 和 Python3 模块(运行 2.7)之外的完整安装。尝试将上述硬件用作服务器和客户端。

TIA,道格

添加了部分日志 两者的最后几个条目。

来自 MySQL.err

2013-11-13T02:05:27.793705Z 0 [Note] IPv6 is available.
2013-11-13T02:05:27.793705Z 0 [Note]   - '::' resolves to '::';
2013-11-13T02:05:27.793705Z 0 [Note] Server socket created on IP: '::'.
2013-11-13T02:05:28.199955Z 0 [Note] Event Scheduler: Loaded 0 events
2013-11-13T02:05:28.199955Z 0 [Note] D:/Program Files/MySQL/MySQL Server 5.7/bin\mysqld: ready for connections.
Version: '5.7.2-m12-log'  socket: ''  port: 3306  MySQL Community Server (GPL)
2013-11-13T02:28:05.919396Z 1 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2013-11-13T02:28:23.592157Z 4 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2013-11-13T04:50:05.102535Z 2 [Note] Aborted connection 2 to db: 'unconnected' user: 'root' host: 'localhost' (Got an error reading communication packets)
2013-11-13T04:50:05.102535Z 5 [Note] Aborted connection 5 to db: 'unconnected' user: 'root' host: 'localhost' (Got an error reading communication packets)

来自 MySQL.log

2013-11-11T23:17:49.240559Z 0 [Note] IPv6 is available.
2013-11-11T23:17:49.240559Z 0 [Note]   - '::' resolves to '::';
2013-11-11T23:17:49.241559Z 0 [Note] Server socket created on IP: '::'.
2013-11-11T23:17:49.252567Z 0 [Note] Event Scheduler: Loaded 0 events
2013-11-11T23:17:49.253567Z 0 [Note] D:/Program Files/MySQL/MySQL Server 5.7/bin\mysqld: ready for connections.
Version: '5.7.2-m12-log'  socket: ''  port: 3306  MySQL Community Server (GPL)
2013-11-11T23:18:44.161120Z 2 [Note] Aborted connection 2 to db: 'mysql' user: 'root' host: 'localhost' (Got an error reading communication packets)
2013-11-11T23:18:44.161120Z 1 [Note] Aborted connection 1 to db: 'mysql' user: 'root' host: 'localhost' (Got an error reading communication packets)
2013-11-11T23:23:42.738555Z 4 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2013-11-12T01:32:37.841648Z 5 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2013-11-12T01:33:17.269224Z 8 [Note] Access denied for user 'root'@'localhost' (using password: NO)
2013-11-12T03:59:44.116187Z 6 [Note] Aborted connection 6 to db: 'unconnected' user: 'root' host: 'localhost' (Got an error reading communication packets)
2013-11-12T03:59:44.117186Z 9 [Note] Aborted connection 9 to db: 'tutorial' user: 'root' host: 'localhost' (Got an error reading communication packets)
2013-11-12T10:19:52.316073Z 18 [Note] Aborted connection 18 to db: 'tutorial' user: 'Doug' host: 'ISAAC' (Got timeout reading communication packets)
2013-11-12T11:43:28.296173Z 20 [Note] Aborted connection 20 to db: 'tutorial' user: 'root' host: 'localhost' (Got timeout reading communication packets)
4

0 回答 0