I've been snooping around and I found that some people's MySQL Server 5.7
directory had a data directory within their MySQL Server 5.7
directory along with bin
, lib
etc. but mine doesn't. I've tried reinstalling multiple ways and I have concluded that the data directory is not there.
Upon launching the MySQL server I get ERROR:
failed to set datadir to C:\Program Files\MySQL\MySQL Server 5.7\data\
By the way, I am using MySQL Server 5.7
connected to the NetBeans IDE 8.2
, so I can't launch my PHP code.
Regarding to this documentation here https://dev.mysql.com/doc/refman/5.7/en/windows-installation-layout.html if you installed your MySQL using the installer, you could find data directory under %PROGRAMDATA%\MySQL\MySQL Server 5.7\
if you find your data directory there, you can send that location to mysqld using --datadir to let mysql server where to find data files.