gpt4 book ai didi

mysql - 安装后,mySQL 不启动(Windows 10,源安装)

转载 作者:可可西里 更新时间:2023-11-01 06:38:57 27 4
gpt4 key购买 nike

我正在 Windows10 上安装 Apache 服务器、php 和 MySQL。前两个是成功的,但 MySQL 有问题。

我把MySQL安装到C:\mysql-5.7.10-winx64,然后把my.ini改成这样

basedir = C:/mysql-5.7.10-winx64
datadir = C:/mysql-5.7.10-winx64/data
port = 3306

我安装成功了,但是如果我尝试启动,它显示如下

C:\Windows\system32>net start mysql
The MySQL service is starting.
The MySQL service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.

但是,如果我检查 Computer Management>Event Viewer>Custom Views>Summary 页面事件,它会告诉我“无法将 datadir 设置为 C:\mysql-5.7.10-winx64\数据\

Error Event Description

如果我手动创建数据文件夹,错误消息会更改为

Can't open the mysql.plugin table

请运行 mysql_upgrade 来创建它.."并且在数据文件夹中创建了一些文件

enter image description here

我尝试通过键入 mysql_upgrade 进行升级,但失败了。

mysql_upgrade: Got error: 2003: Can't connect to MySQL server on 'localhost' (10061) while connecting to the MySQL server. Upgrade process encountered error and will not continue.

我该如何解决这个问题?

最佳答案

清除“数据”目录,然后运行命令mysqld --initialize,和命令net start mysql,宾果游戏!

关于mysql - 安装后,mySQL 不启动(Windows 10,源安装),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34448628/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com