本地计算机上的MySQL57服务已启动,然后停止 [英] The MySQL57 service on Local Computer started and then stopped

查看:1257
本文介绍了本地计算机上的MySQL57服务已启动,然后停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试启动SQL Server时,会弹出一条消息,提示它已启动但随后停止.在我的服务器上重新启动后,发生了这种情况.

When I try to start my SQL server, a message pops up saying that it starts but then stops. This happened after a restart on my server.

有人知道我该如何解决吗?

Does anyone know how I can fix this?

推荐答案

请确保数据目录具有为用户网络服务"和管理员设置的完全权限,并且如果有空格,请在目录名称两边加上引号在里面.确保已设置basedir/未将其注释掉.

Make sure that the data directory has full permissions set for users "Network Service" and Administrator and that you have quotes around the name of the directory if there are spaces in it. Make sure that basedir is set / not commented out.

我通过更改数据目录来测试了这些事情,它重新导致了您上面确切描述的错误,然后修复了新创建的数据目录的权限以消除该错误.现在,我可以更改要注释掉的数据目录来回切换. (仅作为测试,否则就算是胡说八道了.)

I tested these things by changing the data directory, which re-caused the error you describe above exactly, then fixed the permissions of the newly created data directory to eliminate the error. I can switch back and forth now my changing which data directory I comment out. (only as a test, otherwise that's kind of nuts).

C:\ ProgramData \ MySQL \ MySQL Server 5.7 \ my.ini应该是这样,使用Windows 2012 R2服务器进行测试:

C:\ProgramData\MySQL\MySQL Server 5.7\my.ini Should be something like this, using Windows 2012 R2 server to test:

# Path to installation directory. All paths are usually resolved relative to 
this.
basedir="C:/Program Files/MySQL/MySQL Server 5.7/"

# Path to the database root
# datadir="C:/ProgramData/MySQL/MySQL Server 5.7/Data"
datadir="d:/ProgramData/Data"  

这篇关于本地计算机上的MySQL57服务已启动,然后停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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