Error starting mysqld

I load mysql-5.7.9-winx64.zip and when I try to start mysqld I got this error:

 E:\Softwares\mysql-5.7.9-winx64\bin>mysqld mysqld: Could not create or access the registry key needed for the MySQL application to log to the Windows EventLog. Run the application with sufficient privileges once to create the key, add the key manually, or turn off logging for that application. mysqld: Can't change dir to 'E:\Softwares\mysql-5.7.9-winx64\data\' (Errcode: 2 - No such file or directory) 2015-11-13T10:45:09.715411Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_ti mestamp server option (see documentation for more details). 2015-11-13T10:45:09.731411Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path. 2015-11-13T10:45:09.732411Z 0 [ERROR] Cannot open Windows EventLog; check privileges, or start server with --log_syslog=0 2015-11-13T10:45:09.732411Z 0 [Note] mysqld (mysqld 5.7.9) starting as process 3532 ... 2015-11-13T10:45:09.864419Z 0 [Warning] Can't create test file E:\Softwares\mysql-5.7.9-winx64\data\yous-PC.lower-test 2015-11-13T10:45:09.864419Z 0 [Warning] Can't create test file E:\Softwares\mysql-5.7.9-winx64\data\yous-PC.lower-test 2015-11-13T10:45:09.864419Z 0 [ERROR] failed to set datadir to E:\Softwares\mysql-5.7.9-winx64\data\ 2015-11-13T10:45:09.865419Z 0 [ERROR] Aborting 2015-11-13T10:45:09.865419Z 0 [Note] Binlog end 2015-11-13T10:45:09.945424Z 0 [Note] mysqld: Shutdown complete 
+5
source share
7 answers

try the MySQL 5.7.9 installer to install it automatically. mysql-installer-web-community-5.7.9.0.msi and it works.

+6
source

You must run the Command Prompt as an administrator. Then run mysqld.

To do this, right-click the command line launcher icon and select Run as Administrator. Then run mysqld and you will no longer see this error.

mysqld requires access to your registry for the first time. you do not need to do this after the first time.

+5
source

For development / debugging purposes, I need a MySQL server without installation and do not want it to change the installation of Windows, for example. by installing registry keys. MySQL hint "start server with --log_syslog = 0" works well:

 mysqld -u root --log_syslog=0 
+4
source

The Windows operating system will not allow you to make changes to some critical registry keys. However, if you want to make changes even to such registry keys, you will have to fully control these keys before Windows allows you to make or save changes.

check this link: http://www.thewindowsclub.com/how-to-take-full-control-of-windows-7-registry-keys

0
source

I encountered errors of both log errors and data like yours.

Here is my solution:

  • Run the command line as an administrator. Then run mysqld. - (as expected by user1660791)
  • For a path error, you need to make sure that \ instead of \ for the path. An example as shown below: basedir = C:\\myfolder\\mysql-5.7.11-winx64

I have to post this as a new answer due to the fact that I have no comments about allowing other posts.

0
source

I encountered the same problem on a windows machine. I tried to run "Run as administrator" and change the path, but nothing worked.

It turned out that Mysql did not read the file "my.ini". I solved the problem by placing the file "my.ini" in the C: / Windows directory, as mentioned in the official MySQL troubleshooting guide HERE

0
source

Use basedir = C:/myfolder/mysql-5.7.11-winx64 , then find cmd.exe for the path: C:\Windows\System32\cmd.exe .

To do this, right-click the command line launcher icon and select Run as Administrator.

0
source

Source: https://habr.com/ru/post/1235870/


All Articles