MySQL: Cannot start Service, Windows 10

时间:2018-05-14 19:50:46

标签: mysql windows

I am aware that this question has been asked many times before, but all solutions I tried out did not work for me.

So, I installed MySQL Workbench and server. I log into Workbench as root. In the toolbar I click on Server then Startup/Shutdown and there I click on the button Start Server. But whenever I do this, I get following log:

018-05-14 21:09:59 - Starting server...
2018-05-14 21:10:07 - Server start done.
2018-05-14 21:10:09 - Checking server status...
2018-05-14 21:10:09 - Trying to connect to MySQL...
2018-05-14 21:10:09 - Can't connect to MySQL server on 'localhost' (10061) (2003)
2018-05-14 21:10:09 - Assuming server is not running

Addiotionally a popup appears which says:

Connect Error

Could not connect to MySQL: Can't connect to MySQL server on 'localhost' (10061)(code 2003)

One solution I found suggested installing the server manually. So I went into cmd as admin and typed:

C:\> "C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld" --install

It gave following output:

Service successfully installed.

But in Workbench the Server is still stopped and when trying to start it like mentioned above the same logs with the same popup and error appears.

Another solution I found suggested installing MySQL Notifier and using it to start and stop the server and use it to manage monitored items. But quite frankly, once I restart workbench and try to log in as root, it wont even log in but give following pop up error:

Cannot Connect to Database Server

Your conection attempt failed for user 'root' from your host to server at localhost:3306:
Authentication plugin 'catching sha2 password' cannot be loaded: Das angegebene Modul wurde nicht gefunden.

Please:
1 Check that mysql is running on server localhost
2 Check that mysql is running on port 3306 (note: 3306 is the default, but this can be changed)
3 Check the root has rights to connect to localhost from your adress (mysql rights define what clients can connect to the server from which machines)
4 Make sure you are both providing a password if needed and using the correct password for localhost connecting from the host adress you're connecting from

So now this "Authentication plugin 'catching sha2 password' cannot be loaded:" looks suspicious and I tried looking that up. I found this solution,这要求我从cmd登录MySQL,但当我输入C:\Program Files\MySQL\MySQL Server 8.0\bin>mysql -u root -p并执行它时,它请求我提供的密码,然后用

回答
  

ERROR 1045(28000):拒绝访问用户&root;' @' localhost' (使用密码:是)

现在我撞墙了,我不知道如何继续。 MySQL服务器仍然无法工作,我很绝望。

4 个答案:

答案 0 :(得分:0)

您的计算机上是否安装了SQL Server(MSSQL)实例?如果是这样,这可能会导致问题。 MSSQL可能会捕获"端口3306.尝试停止MSSQL服务并测试MySQL。

答案 1 :(得分:0)

此问题的标题是否仍然正确?您的服务似乎已经开始。

您可以尝试重置root密码;您的登录被拒绝,因此数据库可能没有您打算使用的root登录。

要重置您的登录信息,请按照中的说明操作 https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html

答案 2 :(得分:0)

解决服务无法启动的错误的最简单方法是以管理员身份进入注册表。

导航到HKLM \ System \ ControlSet001 \ Services \ MySQL 将映像路径更改为“ C:\ Program Files \ MySQL \ MySQL Server 8.0 \ bin \ mysql.exe” --defaults-file = C:\ Program Files \ MyNewSQL \ bin \ MyNewSQL.ini MyNewSQL

我的问题(与您的相同):

当前注册表设置: C:\ MySQLs \ MySQLDev \ bin \ mysqld --defaults-file = C:/MySQLs/MySQLDev/MySQLDev.ini MySQLDev

将注册表设置更改为: C:\ MySQLs \ MySQLDev \ bin \ mysqld.exe --defaults-file = C:/MySQLs/MySQLDev/MySQLDev.ini MySQLDev

重新运行“ net start MySQLDev”

MySQLDev服务正在启动。 MySQLDev服务已成功启动。

答案 3 :(得分:0)

在 Windows 10 及更早版本上,您必须授予分配给 MySQL 服务的用户对 MySQL 文件夹的完全权限。

我相信最新版本使用用户网络服务,因此使用文件资源管理器,右键单击所有 MySQL 文件夹,单击属性、安全性、编辑并授予用户网络服务对这些文件夹的完全访问权限。 如果不这样做,将导致服务启动和停止,因为如果您使用命令行则可见错误。