每个服务器重新启动后,MySQL会破坏MySQL [英] MySQL corrupts after every server restart

查看:420
本文介绍了每个服务器重新启动后,MySQL会破坏MySQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的问题。我正在从Windows环境运行MySQL和Drupal站点(不是选择,只是事情已经解决了),而且大部分时间该站点是好的,但每次服务器重新启动(从更新或维护)MySQL数据库将损坏。



当我登录到MySQL Work bench时,我注意到服务器状态已停止,当我尝试启动它时,我收到错误:



错误致命错误:无法打开和锁定特权表:找不到文件:'user'(errno:2 - 没有这样的文件或目录)



然后MySQL服务器无法重新启动。



解决此问题的唯一方法是删除ProgramData / MySQL中的数据文件夹,然后将其替换为全新安装的MySQL的备份,然后导入我的表和重新创建我的用户。



我的问题是什么导致MySQL在每次重新启动时都会损坏,我该怎么办?

解决方案

这对我有用:
坚持32位。



卸载并确保在安装之前删除mysql-data文件夹及其所有子文件夹,并且更喜欢使用32位(有时64位版本是问题)。



来源


I Have a bit of an odd problem. I am running MySQL and Drupal site from a windows environment (not by choice but it is just how things have worked out) and most of the time the site is fine however every time the server is restarted (from updates or for maintenance) The MySQL Database will corrupt.

When I log in to MySQL Work bench I notice that the server status is stopped and when I try to start it I get the error:

ERROR Fatal error: Can't open and lock privilege tables: Can't find file: 'user' (errno: 2 - No such file or directory)

and then MySQL Server fails to restart.

The only way around this problem is to delete data folder in the ProgramData/MySQL and then replace it with a backup from a fresh install of MySQL then import a backup of my tables and recreate my users.

My Question is what is causing MySQL to corrupt at every sever restart and what can I do to prevent this happening moving forward?

解决方案

This worked for me: Stick with the 32 bit.

Uninstall and make sure you then DELETE the mysql-data folder and all its subfolders before installing, and prefer to use the 32 bit (sometimes 64 bit versions are the problem).

(Source)

这篇关于每个服务器重新启动后,MySQL会破坏MySQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆