mysqlreset-password

mysqld: File '.\binlog.index' not found (OS errno 13 - Permission denied)


its a duplicate question but i still cannot solve this problem.

I have forgotten my MySQL root user password and i followed this troubleshoot steps https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html upon running the command

mysqld --init-file=C:\\mysql-init.txt --console

it gives following output

2022-09-26T12:10:19.366600Z 0 [System] [MY-010116] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.30) starting as process 7280

2022-09-26T12:10:19.368952Z 0 [Warning] [MY-010091][Server] Can't create test file C:\Program Files\MySQL\MySQL Server 8.0\data\mysqld_tmp_file_case_insensitive_test.lower-test

2022-09-26T12:10:19.369022Z 0 [Warning] [MY-010091] [Server] Can't create test file C:\Program Files\MySQL\MySQL Server 8.0\data\mysqld_tmp_file_case_insensitive_test.lower-test mysqld: File '.\binlog.index' not found (OS errno 13 - Permission denied)

2022-09-26T12:10:19.371806Z 0 [ERROR] [MY-010119] [Server] Aborting

2022-09-26T12:10:19.372077Z 0 [System] [MY-010910] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.

i cannot even run

 mysql

it gives following error

ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)

I am not sure what is wrong here.


Solution

  • i got it working after several more steps other than those mentions in the document. After FreudianSlip comments to make sure to start mysqld as administrator i got rid of these error but it still didnt work . what actually worked is mentioned in this comment https://stackoverflow.com/a/65214867/19982606