- #1
- 2,138
- 2,713
- TL;DR Summary
- mysqld command does not start the MySQL 8.0 server.
I just installed MySQL Server 8.0. The server is configured to run automatically at startup. However, when I wake up my laptop from hibernation or sleep, sometimes the server stops. I read on the net that I should execute
I have set the folder of binaries in MySQL Server install folder in the path variable. When I execute the above command in PowerShell, I get the following error:
Taking a hint from line #5, I created the data directory under the path stated in the error message:
I plan to work from Java using the MySQL J connector. Once the server is up, I can execute commands from Java properly.
Why is
Note that opening command prompt/PowerShell with administrator privileges does not solve the problem.
mysqld
from command line to start the server.I have set the folder of binaries in MySQL Server install folder in the path variable. When I execute the above command in PowerShell, I get the following error:
Code:
PS C:\Users\Wrichik Basu> mysqld
2020-05-09T14:06:37.383019Z 0 [System] [MY-010116] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.20) starting as process 3964
2020-05-09T14:06:37.437373Z 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
2020-05-09T14:06:37.437616Z 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
2020-05-09T14:06:37.438002Z 0 [ERROR] [MY-013276] [Server] Failed to set datadir to 'C:\Program Files\MySQL\MySQL Server 8.0\data\' (OS errno: 2 - No such file or directory)
2020-05-09T14:06:37.476711Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-05-09T14:06:37.477010Z 0 [System] [MY-010910] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.20) MySQL Community Server - GPL.
C:\Program Files\MySQL\MySQL Server 8.0\
. Now when I run mysqld
, there are no error messages but the server simply doesn't start. So I have to manually go to Services and start the server.I plan to work from Java using the MySQL J connector. Once the server is up, I can execute commands from Java properly.
Why is
mysqld
not working?Note that opening command prompt/PowerShell with administrator privileges does not solve the problem.