故障排除

 

故障排查

检测到的问题以及可能的解决方案

下表列出了在 SQL 数据传输期间可能检测到问题,并提出了可能的解决方案:

问题

原因

解决方案

检测到应用程序 错误,并且控制器设置为“暂停”状态。

传输的 SQL 数据量大,为相应任务配置的看门狗时间已超时。

EcoStruxure Machine Expert 任务配置中增加看门狗时间

有关详细信息,请参见 EcoStruxure Machine Expert 编程指南中的配置具体任务章节。

SQL Gateway 占用了大量内存空间。

硬盘上保存的日志消息过多。

手动清除日志消息选项卡中的表格内容,或者根据手动和自动清除日志文件的说明调整设置以自动移除日志消息。

无法建立到数据库的连接

TCP/IP 端口上的数据传输受阻。

配置防火墙,以便能够通过 TCP/IP 端口 3457 进行数据传输。

指示 MySQL 数据库连接问题的消息

下表列出了 SQL Gateway 发布的用于指示无法建立到 MySQL 数据库的连接的消息。最后一列提出了可能的解决方案:

消息文本

原因

解决方案

Authentication to host ‘localhost’ for user ‘root’ using method ‘mysql_native_password’ failed with message: Unknown database ‘qw’

未找到数据库。

在SQL Gateway 配置选项卡的数据库连接节点中,输入正确的连接名称

Host ‘WIN-1UT5MKD9831’ is not allowed to connect to this MySQL server

未找到服务器地址。

配置选项卡的数据库服务器节点中,输入正确的服务器地址以识别正运行该数据库服务器的 PC。

Authentication to host ‘localhost’ for user “ using method ‘mysql_native_password’ failed with message: Access denied for user “@localhost’ (using password: YES)

未找到用于访问数据库的用户名。

配置选项卡的数据库服务器节点中,输入用于访问数据库的正确用户名

Authentication to host ‘localhost’ for user ‘root’ using method ‘mysql_native_password’ failed with message: Access denied for user ‘root’@’localhost’ (using password: YES)

用于访问数据库的用户名不正确。

Authentication to host ‘localhost’ for user ‘root’ using method ‘mysql_native_password’ failed with message: Access denied for user ‘root’@’localhost’ (using password: NO)

未找到用于访问数据库的密码。

配置选项卡的数据库服务器节点中,输入用于访问数据库的正确密码

Authentication to host ‘localhost’ for user ‘root’ using method ‘mysql_native_password’ failed with message: Access denied for user ‘root’@’localhost’ (using password: YES)

用于访问数据库的密码不正确。

Unable to connect to any of the specified MySQL hosts.

导致产生这个消息的原因有多种:

o连接协议不正确。

o服务器地址不正确。

o配置选项卡的数据库服务器中,选择 TCP 作为连接协议

o配置选项卡的数据库服务器节点中,输入正确的服务器地址以识别正运行该数据库服务器的 PC。

指示 SQLite 数据库连接问题的消息

下表列出了 SQL Gateway 发布的用于指示无法建立到 SQLite 数据库的连接的消息。最后一列提出了可能的解决方案:

消息文本

原因

解决方案

Data Source cannot be empty. Use :memory: to open an in-memory database

未找到数据库文件。

配置选项卡的数据库连接节点中,输入直通 SQLite 数据库文件的正确路径,或者单击浏览按钮,在文件系统中浏览至该文件。