Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue when running mysqld

Tags:

mysql

I download mysql-5.7.9-winx64.zip and when i try to run 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
like image 834
Hayi Avatar asked Nov 13 '15 10:11

Hayi


People also ask

How do you check that mysqld is running?

We check the status with the systemctl status mysql command. We use the mysqladmin tool to check if MySQL server is running. The -u option specifies the user which pings the server. The -p option is a password for the user.

What does mysqld command do?

mysqld, also known as MySQL Server, is a single multithreaded program that does most of the work in a MySQL installation. It does not spawn additional processes. MySQL Server manages access to the MySQL data directory that contains databases and tables.


4 Answers

For development/debugging purposes i need a MySQL-Server without installation and don't want it to change my windows installation, e.g. by setting registry keys. MySQL's hint "start server with --log_syslog=0" works well:

mysqld -u root --log_syslog=0
like image 131
Martin Pabst Avatar answered Sep 22 '22 18:09

Martin Pabst


Windows operating system will not allow you to make changes in certain system critical registry keys. Nevertheless, if you want to make changes even in such registry keys, you will have to take full control of these keys before Windows will allow you to make or save the changes.

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

like image 45
malyy Avatar answered Sep 26 '22 18:09

malyy


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

To do this right click the Command Prompt startup icon and then select Run As Admininistrator. Then run mysqld and you should no longer see that error.

mysqld needs access to your registry the first time. you do not have to do this after the first time.

like image 44
user1660791 Avatar answered Sep 26 '22 18:09

user1660791


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

like image 38
solarie Avatar answered Sep 26 '22 18:09

solarie