I'm running MySQL server 5.6
on Windows 2012 R2
, and since the installation didn't go as planned, I had to re-install it to change the data directory path.
The installer for some reasons never gave the option back to change the directory upon installation, despite multiple restarts.
I have re-installed MySQL anyway, stopped the service, deleted the "data" folder, and tried changing basedir
through my.ini
. It never worked. When I type "SHOW VARIABLES WHERE Variable_Name LIKE "%dir"
" through SQL it returns that the data folder (datadir
) is still "C:\ProgramData\MySQL\MySQL Server 5.6\Data\
".
I know I shouldn't have deleted the data folder, but I figured they would create a fresh new DB when I delete it.
What's weird is that my database is working probably through some sort of cache.
I backed up my database through phpmyadmin
, and restarted the server machine to see if the database is gone because the data folder is missing.
Nope, I was wrong. The database is still there with no data loss! And the data folder is still missing!
How is this even possible? Where is the database being stored right now then?. How could I force MySQL server to write what's in the cache into the disk?
datadir
is completely empty? Noibdata*
file there?