C:\Windows\System32>"D:\mysql-5.7.31-winx64\bin\mysql.exe" --initialize-insecure mysql: [ERROR] unknown option '--initialize-insecure'
时间: 2024-05-14 08:16:28 浏览: 26
这个错误提示说明你的 MySQL 版本不支持 `--initialize-insecure` 这个选项。这个选项是用于在初始化 MySQL 数据库时不设置 root 用户的密码,而直接允许登录。如果你的 MySQL 版本不支持该选项,可以尝试使用以下命令进行初始化:
```
"D:\mysql-5.7.31-winx64\bin\mysqld.exe" --initialize
```
这个命令会生成一个随机密码,你可以在 MySQL 日志文件中找到这个密码。然后你可以使用以下命令登录 MySQL,并修改 root 用户的密码:
```
"D:\mysql-5.7.31-winx64\bin\mysql.exe" -u root -p
```
输入之前生成的随机密码登录,然后执行以下命令修改密码:
```
ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';
```
将 `new_password` 替换为你想要设置的新密码即可。
相关问题
安装mysql-5.7.35-winx64.zip
MySQL是一款免费、开源的关系型数据库管理系统,广泛应用于Web应用程序开发中。如果您想在Windows上安装MySQL-5.7.35-winx64.zip,可以按照以下步骤操作:
步骤1:下载MySQL-5.7.35-winx64.zip文件
您可以从MySQL官网上下载MySQL-5.7.35-winx64.zip文件,也可以从其他可靠的下载网站进行下载。
步骤2:解压缩MySQL-5.7.35-winx64.zip文件
使用zip解压工具解压文件,然后将解压的文件夹移动到一个适合的位置,比如:C:\Program Files\MySQL\。
步骤3:配置MySQL
进入MySQL-5.7.35-winx64文件夹,找到my-default.ini文件,将它复制一份,改名为my.ini。然后打开my.ini文件,找到[mysqld]行,加上一行:basedir = "MySQL的安装路径",保存并退出。
步骤4:安装MySQL服务
进入MySQL-5.7.35-winx64文件夹,以管理员身份运行cmd窗口,切换到bin目录。使用mysql_installservice.exe工具安装MySQL服务,在cmd窗口输入:mysqld --install。
步骤5:启动MySQL服务
在cmd窗口输入:net start mysql,启动MySQL服务。
至此,您已经成功地安装了MySQL-5.7.35-winx64.zip,可以开始使用MySQL进行数据管理和应用程序开发了。
The current server installed: D:\mysql-5.7.37-winx64\bin\mysqld MySQL
is a relational database management system (RDBMS) that uses Structured Query Language (SQL) to manage and organize data. It is commonly used in web applications to store and retrieve data. The current version installed on the server is 5.7.37 for Windows 64-bit operating systems. The mysqld.exe file is the main server executable for MySQL.
相关推荐
![msi](https://img-home.csdnimg.cn/images/20210720083646.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)