The reason for this behavior is Vista/Win7 file system redirection. Writes to protected locations (in this case a subdirectory of Program Files) are redirected to the user's so-called "Virtual Store".
Workarounds:
The Windows installer for MariaDB 5.2.6 and higher will set the data directory ACL to include full access rights for the user who runs the setup to prevent this issue from happening.
Running mysql_install_db.exe
from a standard command prompt might cause the error:
FATAL ERROR: OpenSCManager failed
To get rid of it, use the elevated command prompt, for example on Windows 7 start it via 'Run as administrator' option.
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/installation-issues-on-windows/