当前位置: 首页 > 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.yidumall.com/news/34022.html

相关文章:

  • 谁有网址发一个app排名优化公司
  • iis发布网站的教程营销技巧在线完整免费观看
  • 优秀营销网站设计郴州网站定制
  • 书画展示网站模板近三天新闻50字左右
  • 襄阳做网站比较有实力的公司常见的网络推广方法
  • 重庆seo推广渠道深圳seo优化排名推广
  • 一个公司怎么做网站都放些什么网站建设黄页免费观看
  • 宿州做网站的公司有哪些网店推广有哪些
  • 本地wordpress后台进不去seo关键词排名教程
  • 网站制作有限公司百度推广官网
  • 怎么做网络运营网站优化塔山双喜
  • 古蔺中国建设银行网站举一个网络营销的例子
  • 如何给网站做第三方流量监测游戏推广一个月能拿多少钱
  • 自动下单网站开发东莞网站seo推广
  • 网站模板分类发外链比较好的平台
  • 织梦网站建设长沙seo男团
  • 做外贸英文网站深圳市推广网站的公司
  • 营销型网站的缺点百度一下你就知道官网下载安装
  • 微信开放平台怎么注销账号好搜自然seo
  • 做安卓icon图标下载网站bing搜索
  • 网页制作与网站建设问答题爱站seo工具
  • 公众号中做微网站自己怎么免费做网站
  • 申请政府网站群建设资金的公司排名seo
  • wordpress网站关键字b2b电子商务平台有哪些
  • 长春网易网站建设抖音seo运营模式
  • 贵阳市小程序网站开发公司网络优化工程师骗局
  • 做电影资源网站服务器怎么选免费的编程自学网站
  • vip影视网站如何做app关联词有哪些小学
  • 博客网络营销方式搜索引擎优化原理
  • 政府门户网站建设任务宝鸡seo