Windows11 安装MySQL服务 提示:Install/Remove of the Service Denied
Posted 在奋斗的大道
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Windows11 安装MySQL服务 提示:Install/Remove of the Service Denied相关的知识,希望对你有一定的参考价值。
今天在Windows 11 系统中安装mysql8 数据库时,安装MySQL8 服务提示如下错误信息:
错误原因:
- 安装/删除服务被拒绝!
- 说明权限不够,无法进行操作
解决办法:
- 以管理员身份运行cmd.exe文件
PS C:\\Users\\zzg> mysqld --install MySQL
Service successfully installed.
PS C:\\Users\\zzg> net start MySQL
MySQL 服务正在启动 .
MySQL 服务已经启动成功。
PS C:\\Users\\zzg> mysql -u root -p
Enter password: ************
Welcome to the MySQL monitor. Commands end with ; or \\g.
Your MySQL connection id is 8
Server version: 8.0.28
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.
mysql>
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
Query OK, 0 rows affected (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
![](https://image.cha138.com/20220423/cdc7a42f7f7b4df8a92f17874c6ec6cc.jpg)
![](https://image.cha138.com/20220423/3e861489c5c847a78da0d08c11217388.jpg)
以上是关于Windows11 安装MySQL服务 提示:Install/Remove of the Service Denied的主要内容,如果未能解决你的问题,请参考以下文章
mysql install of step in Windows 10