Search code examples
databasewindows-servicesmysql-workbenchmysql

System error 5 has occurred. Access is denied. (MySQL)


I tried to start the newly installed MySQL server (V 5.5.15 on Windows Vista) using the mysqld command in the command prompt, but resulted the following error:

When I use mysqld command:

C:\Users\Panora>mysqld
110914 16:23:02 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.5\data\Panora-PC.lower-test
110914 16:23:02 [Warning] Can't create test file C:\Program Files\MySQL\MySQL Server 5.5\data\Panora-PC.lower-test
mysqld: File '.\mysql-bin.index' not found (Errcode: 13)
110914 16:23:02 [ERROR] Aborting

110914 16:23:02 [Note] mysqld: Shutdown complete


C:\Users\Panora>

When I use NET START command:

C:\Users\Panora>NET START MySQL55
System error 5 has occurred.

Access is denied.


C:\Users\Panora>

Additional notes:

(1) I'm able to start and stop the server using the MySQLWorkbench visual UI without any problems

(2) I'm able to stop the server using the command line without any problem using this command mysqladmin -u root -p shutdown


Solution

  • This error is because of wrong permissions (denied). Check the user under which mysql is supposed to start and the permissions of the data directory.