为什么安装MySQL最后initializing database出现问题?

安装MySQL最后initializing database出现问题

img

log为
**Beginning configuration step: Writing configuration file

Saving my.ini configuration file.
Saved my.ini configuration file.
Ended configuration step: Writing configuration file

Beginning configuration step: Updating Windows Firewall rules

Adding a Windows Firewall rule for MYSQL80 on port 3306.
Attempting to add a Windows Firewall rule with command: netsh.exe advfirewall firewall add rule name="Port 3306" protocol=TCP localport=3306 dir=in action=allow
确定。

Successfully added the Windows Firewall rule.
Adding a Windows Firewall rule for MYSQL80 on port 33060.
Attempting to add a Windows Firewall rule with command: netsh.exe advfirewall firewall add rule name="Port 33060" protocol=TCP localport=33060 dir=in action=allow
确定。

Successfully added the Windows Firewall rule.
Ended configuration step: Updating Windows Firewall rules

Beginning configuration step: Adjusting Windows service

Attempting to grant Network Service require filesystem permissions.
Granted permissions.
Adding new service
New service added
Ended configuration step: Adjusting Windows service

Beginning configuration step: Initializing database (may take a long time)

Attempting to run MySQL Server with --initialize-insecure option...
Starting process for MySQL Server 8.0.25...
Starting process with command: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" --console --initialize-insecure=on --lower-case-table-names=0...
'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.25) initializing of server in progress as process 16856
The server option 'lower_case_table_names' is configured to use case sensitive table names but the data directory is on a case-insensitive file system which is an unsupported combination. Please consider either using a case sensitive file system for your data directory or switching to a case-insensitive table name mode.
The designated data directory C:\ProgramData\MySQL\MySQL Server 8.0\Data\ is unusable. You can remove all files that the server added to it.
Aborting
C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.25) MySQL Community Server - GPL.
Process for mysqld, with ID 16856, was run successfully and exited with code 1.
Failed to start process for MySQL Server 8.0.25.
Database initialization failed.
Ended configuration step: Initializing database (may take a long time)

**
有人知道怎么回事吗

按照这个链接操作下:https://blog.csdn.net/lxhsjl121/article/details/118969432

有帮助的话,请点采纳该答案~

  1. MySQL 服务未正确安装:在安装过程中可能存在一些问题,导致 MySQL 服务没有正确地安装。可以尝试重新安装 MySQL,并确保在安装过程中没有出现任何错误。

  2. 数据库文件夹权限问题:如果 MySQL 安装程序无法在指定目录下创建数据库文件夹,也会导致初始化数据库时出现问题。可以检查 MySQL 安装目录以及相关文件夹的权限是否正确,如果没有正确设置,可以尝试重新设置。

  3. 防火墙或安全软件的阻止:某些防火墙或安全软件可能会阻止 MySQL 初始化数据库。可以尝试关闭防火墙或安全软件,然后重新尝试初始化数据库。

  4. 硬件或系统问题:如果系统或硬件存在问题,可能会导致 MySQL 初始化数据库时出现错误。可以检查硬件设备是否工作正常,或者尝试在另一台计算机上重新安装 MySQL。

在你的Mysql服务配置里配置了表名大小写敏感,但是你的数据目录是不区分大小写的文件系统,这两者是冲突的。

原因:由于设置表名大小写敏感需要操作系统的支持,Windows的目录名是不区分大小写的,所以这里会报错。