phpMyAdmin 导致 MySQL 主机服务器崩溃
在过去的几天里,我已经多次遇到这个问题。 所以,这种情况偶尔会发生。 我在远程机器上设置了mysql,另一台机器上有一个java程序每隔几秒查询数据库以读取和写入记录。
我正在使用 phpMyAdmin 来管理我的数据库。 有时,在运行一些 SQL 查询后,mysql 服务器会停止响应。 即使 ping 主机也不成功。 而且,我必须请有权物理访问机器的人再次启动它。
我检查了日志文件,但在 mysql 目录中找不到它们。 默认情况下禁用日志记录吗? 这里缺少什么? 而且,我该如何解决这个问题?
编辑: 一段时间后我能够 ping 通服务器。 所以,服务器一定是暂时繁忙。 这不是一个特定的查询,而是像在浏览选项卡下按顺序重新排序表的数据之类的事情。
I have encountered this problem a couple of times, in the last few days. So, it happens occasionally. I have setup mysql on a remote machine, and there is a java program on another machine querying the database to read and write records every few seconds.
I am using phpMyAdmin to administer my database. And, at times, after running some SQL query, the mysql server stops responding. Even the pinging the host machine doesn't succeed. And, I have to ask someone with physical access to the machine to boot it up again.
I checked for log files but couldn't find them in the mysql directory. Is logging disabled by default? What is missing here? And, how can I go about troubleshooting this?
EDIT:
I was able to ping the server after some while. So, the server must have been temporarily busy. It's not a specific query but things like re-ordering the data of a table serially under the browse tab.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 mysqlclient 建立连接并保持打开状态。
我个人从命令行使用mysql。
如果服务器变得无响应,执行
它将列出所有 mysql 进程并显示查询等待/执行的时间。
可以选择使用 KILL 语句来终止锁定表的查询。
Use a mysqlclient to make a connection and keep it open.
I personally use the mysql from the commandline.
If the server becomes unresponsive execute
It will list all mysql processes and will show how long queries are waiting/executing.
Optionally use the KILL statement to terminate the query that locking the tables.
我强烈建议使用 MySQL 自己的 GUI 工具 进行数据库管理,出于多种原因:
I'd highly recommend using MySQL's own GUI tools for database management, for a vriety of reasons: