I installed mySQL 5.7 and 8.0 on my pc, the first day it worked fine, but after a few days without using it, it just stopped working. The problem is I try to start the SQL server 8.0 in services in windows configuration and this warning appears.
The mySQL 5.7 starts fine through services.
I have tried mysqld --install and mysqld --initialize.
When I run the second command this error appears:
C:\Program Files\MySQL\MySQL Server 8.0\bin>mysqld --initialize
2023-03-07T18:28:35.102240Z 0 [Note] [MY-013847] [Server] Using jemalloc.dll for my_malloc and ut::malloc etc.
2023-03-07T18:28:35.117659Z 0 [ERROR] [MY-000077] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Error while setting value 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' to 'sql_mode'.
2023-03-07T18:28:35.169045Z 0 [ERROR] [MY-010187] [Server] Could not open file 'C:\MySQLData\DESKTOP-KDETTU2.err' for error logging: Permission denied
2023-03-07T18:28:35.177600Z 0 [ERROR] [MY-013236] [Server] The designated data directory C:/MySQLData/ is unusable. You can remove all files that the server added to it.
2023-03-07T18:28:35.178022Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-03-07T18:28:35.178227Z 0 [Note] [MY-010120] [Server] Binlog end
Could someone help me resolve this issue? I don't know what to do and I can't find nothing on the internet besides the mysqld --initialize solution. edit 1: I have started the cmd as administrator but it doesn't work.
The question associated with my problem has nothing in common, I can't even start the mySQL server and that's my problem.