输入net start mysql显示MySQL 服务正在启动 . MySQL 服务无法启动。 服务没有报告任何错误。 请键入 NET HELPMSG 3534 以获得更多的帮助。

C:\Windows\system32>e:
E:\mysql-5.7.19\bin>mysqld --install
The service already exists!
The current server installed: E:\mysql-5.7.19\bin\mysqld MySQL

E:\mysql-5.7.19\bin>net start MySQL80
服务名无效。

请键入 NET HELPMSG 2185 以获得更多的帮助。


E:\mysql-5.7.19\bin>net start MySQL
MySQL 服务正在启动 .
MySQL 服务无法启动。

服务没有报告任何错误。

请键入 NET HELPMSG 3534 以获得更多的帮助。


E:\mysql-5.7.19\bin>net stop mysql
没有启动 MySQL 服务。

请键入 NET HELPMSG 3521 以获得更多的帮助


E:\mysql-5.7.19\bin>mysqld --initialize-insecure
2021-03-18T06:00:36.623218Z 0 [ERROR] Can't find error-message file 'E:\mysql-5.7.19\bin\:\mysql-5.7.19\share\errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2021-03-18T06:00:36.625219Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2021-03-18T06:00:36.626219Z 0 [ERROR] Aborting

以管理员的身份打开cmd


E:\mysql-5.7.19\bin>sc delete mysql
[SC] DeleteService 成功

E:\mysql-5.7.19\bin>mysqld -install mysql
Service successfully installed.

E:\mysql-5.7.19\bin>net start mysql
mysql 服务正在启动 .
mysql 服务无法启动。

服务没有报告任何错误。

请键入 NET HELPMSG 3534 以获得更多的帮助。


E:\mysql-5.7.19\bin>

执行mysqld --initialize-insecure ,执行报错,查看bin的同级目录下会多出一个data文件夹,里面一堆文件,删掉,再执行。


E:\mysql-5.7.19\bin>mysqld -install
The service already exists!
The current server installed: E:\mysql-5.7.19\bin\mysqld MySQL

E:\mysql-5.7.19\bin>sc query mysql

SERVICE_NAME: mysql
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 1  STOPPED
        WIN32_EXIT_CODE    : 1077  (0x435)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

E:\mysql-5.7.19\bin>mysqld -install
The service already exists!
The current server installed: E:\mysql-5.7.19\bin\mysqld MySQL

E:\mysql-5.7.19\bin>mysqld --initialize-insecure --user=mysql
2021-03-18T07:56:39.779379Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2021-03-18T07:56:39.782380Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2021-03-18T07:56:39.782380Z 0 [ERROR] Aborting


E:\mysql-5.7.19\bin>sc query mysql

SERVICE_NAME: mysql
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 1  STOPPED
        WIN32_EXIT_CODE    : 1077  (0x435)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

E:\mysql-5.7.19\bin>sc delete mysql
[SC] DeleteService 成功

E:\mysql-5.7.19\bin>mysqld -install
Service successfully installed.

E:\mysql-5.7.19\bin>mysqld --initialize-insecure --user=mysql
2021-03-18T07:57:44.499480Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2021-03-18T07:57:44.502481Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2021-03-18T07:57:44.503479Z 0 [ERROR] Aborting


E:\mysql-5.7.19\bin>net start mysql
MySQL 服务正在启动 .
MySQL 服务无法启动。

服务没有报告任何错误。

请键入 NET HELPMSG 3534 以获得更多的帮助。


E:\mysql-5.7.19\bin>mysqld --install
The service already exists!
The current server installed: E:\mysql-5.7.19\bin\mysqld MySQL

E:\mysql-5.7.19\bin>sc delete mysql
[SC] DeleteService 成功

E:\mysql-5.7.19\bin>sc query mysql
[SC] EnumQueryServicesStatus:OpenService 失败 1060:

指定的服务未安装。


E:\mysql-5.7.19\bin>mysqld -install
Service successfully installed.

E:\mysql-5.7.19\bin>sc query mysql

SERVICE_NAME: mysql
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 1  STOPPED
        WIN32_EXIT_CODE    : 1077  (0x435)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0


E:\mysql-5.7.19\bin>net start mysql
MySQL 服务正在启动 .
MySQL 服务无法启动。

服务没有报告任何错误。

请键入 NET HELPMSG 3534 以获得更多的帮助。

E:\mysql-5.7.19\bin>sc delete mysql
[SC] DeleteService 成功

E:\mysql-5.7.19\bin>mysqld --install
Service successfully installed.

E:\mysql-5.7.19\bin>sc query mysql

SERVICE_NAME: mysql
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 1  STOPPED
        WIN32_EXIT_CODE    : 1077  (0x435)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

E:\mysql-5.7.19\bin>mysqld --initialize

E:\mysql-5.7.19\bin>net start mysql
MySQL 服务正在启动 .
MySQL 服务已经启动成功。


 

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值