C:WINDOWSsystem32>mysqld --install mysql8
The service already exists!
The current server installed: E:mysqlmysql-5.6.42-winx64inmysqld mysql8
查看 是否有旧的mysql服务进程
C:WINDOWSsystem32>sc query mysql
SERVICE_NAME: mysql
TYPE : 10 WIN32_OWN_PROCESS
STATE : 1 STOPPED
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x7d0
删除服务
C:WINDOWSsystem32>sc delete mysql
[SC] DeleteService 成功
C:WINDOWSsystem32>sc delete mysql8
[SC] DeleteService 成功
C:WINDOWSsystem32>sc delete MySQL
[SC] DeleteService 失败 1072:
指定的服务已标记为删除。
重新安装mysql8