当前位置: 首页 > news >正文

深圳网站设计+建设首选深圳市沧州网站营销推广

深圳网站设计+建设首选深圳市,沧州网站营销推广,网页设计图片大小规范,电商网站设计内容文章目录 问题描述排查1.字面意思2.搜索引擎3.官方文档4.源码 处理方法相关扩展 问题描述 MySQL安装MySQL服务时提示Install-Remove of the Service Denied! 详细报错如下: C:\Users\荷塘月色>net start mysql 服务名无效。请键入 NET HELPMSG 2185 以获得更多…

文章目录

    • 问题描述
    • 排查
      • 1.字面意思
      • 2.搜索引擎
      • 3.官方文档
      • 4.源码
    • 处理方法
      • 相关扩展


问题描述

MySQL安装MySQL服务时提示Install-Remove of the Service Denied!

详细报错如下:

C:\Users\荷塘月色>net start mysql
服务名无效。请键入 NET HELPMSG 2185 以获得更多的帮助。C:\Users\荷塘月色>cd /d F:\Database\mysql-5.7.25-winx64\binF:\Database\mysql-5.7.25-winx64\bin>mysqld -install
Install/Remove of the Service Denied!F:\Database\mysql-5.7.25-winx64\bin>

排查

1.字面意思

Install/Remove of the Service Denied

安装/删除服务被拒绝,看起来好像是权限问题,权限不够。

2.搜索引擎

MySQL的文章还是很多的,这个问题好像也挺常见的,很容易就搜到了。

确实是权限不够,用管理员权限打开cmd就可以了。

3.官方文档

虽然已经有了处理方法,还是想看看官方文档有没有相关的说明。

相关搜索:https://dev.mysql.com/doc/search/?d=12&p=1&q="mysqld+-install"

找了篇文章:https://dev.mysql.com/doc/refman/5.7/en/windows-start-service.html

复制了下前面的一段话,注意后面加粗部分即是相关说明。

On Windows, the recommended way to run MySQL is to install it as a Windows service, so that MySQL starts and stops automatically when Windows starts and stops. A MySQL server installed as a service can also be controlled from the command line using NET commands, or with the graphical Services utility. Generally, to install MySQL as a Windows service you should be logged in using an account that has administrator rights.

在Windows上,推荐的运行MySQL的方式是将其作为Windows服务安装,以便MySQL在Windows启动和停止时自动启动和停止。安装为服务的MySQL服务器也可以使用。NET命令或图形化服务实用程序从命令行进行控制。一般来说,要将MySQL安装为Windows服务,您应该使用具有管理员权限的帐户登录。

4.源码

搜关键字Remove of the Service,找到了相关源码:mysql-server\router\src\router\src\windows\nt_servc.cc

主要代码:

    if (ret_error == ERROR_ACCESS_DENIED) {printf("Install/Remove of the Service Denied!\n");if (!is_super_user())printf("That operation should be made by a user with Administrator ""privileges!\n");} elseprintf("There is a problem when opening the Service Control Manager!\n");

处理方法

用管理员权限打开cmd,执行命令,注册服务。

C:\Windows\system32>cd /d F:\Database\mysql-5.7.25-winx64\binF:\Database\mysql-5.7.25-winx64\bin>mysqld --install MySQL57 --defaults-file=F:\Database\mysql-5.7.25-winx64\my.ini
Service successfully installed.F:\Database\mysql-5.7.25-winx64\bin>mysqld --initializeF:\Database\mysql-5.7.25-winx64\bin>mysqld --initialize
2025-02-14T03:47:12.878700Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2025-02-14T03:47:12.881124Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2025-02-14T03:47:12.882042Z 0 [ERROR] AbortingF:\Database\mysql-5.7.25-winx64\bin>net start mysql57
MySQL57 服务正在启动 .
MySQL57 服务已经启动成功。F:\Database\mysql-5.7.25-winx64\bin>

相关扩展

  1. mysqld --install 注册服务时,可指定服务名称,比如一个Windows上面安装两个版本的MySQL数据库,具体可参考:https://dev.mysql.com/doc/refman/5.7/en/windows-start-service.html。

  2. mysqld --initialize 初始化数据库的目录必须为空。但是如果不为空,会有提示,不会强制删除文件。(如上示例)

  3. net start 启动服务命令,服务名不区分大小写。

http://www.yayakq.cn/news/28410/

相关文章:

  • 蓝色高科技网站模板来年做那些网站能致富
  • 怎么用wordpress建电商网站吗云南省建设厅网站处长
  • 泰安手机网站学室内设计去哪好
  • discuz做网站网站有没有做等级测评怎么查看
  • 藁城网站建设网站建设要多钱
  • 深圳网站设计 商城深圳建筑工程公司排名
  • 织梦做网站简单吗个人网站风格设计
  • wordpress悬浮搜索框网站建设备案优化设
  • 做黑彩网站wordpress 热门文章
  • 网站建设是基础服务吗东莞企业建设网站官网有限公司
  • 四川省住房与建设厅网站怎么制作一个网站及小程序
  • 做网站公司q房网广东vs北控直播
  • wordpress界面菜单怎么弄网站首页排名seo搜索优化
  • 云南建设项目招标公告发布网站建筑网app
  • 怎么做微信网站推广合肥有没有做网站的单位
  • 营口汽车网站建设有没有可以看的网址
  • wordpress主题中文主题下载天津seo培训机构
  • 建设美食电子商务网站.net开发微信网站
  • 做招聘网站公司成都工程设计公司
  • 纯手工建网站淘宝客怎么做自己的网站
  • 网站锚文本怎么做河南商城网站建设
  • 有口碑的南昌网站建设自适应网页和响应式网页区别
  • 58同城网站建设推广wordpress 手机端APP
  • 厦门网站建设技术支持制作php网站
  • 湖州网站开发区火炬手wordpress 镜像存储
  • 免费网站建站页面国际交流网站平台有哪些
  • mysql php网站开发阿里云1元域名
  • 做自己个人网站wordpress插件查看
  • 东莞企业网站建设预算大概多少网络有限公司做女装网站的
  • 网站设计制作一般多少钱重庆制片公司