Comments - Installation issues on Windows

9 years, 5 months ago Cristofer Wolz-Romberger

I'm having an issue: I followed instructions ( for mariadb 5.5.33a, and can't get it to install/run.

I tried several things (and didn't keep track of what I did or the results: bad idea, I know). However, what I'm stuck with now is when I attempt to run

"mysql_install_db.exe --datadir=c:\mydatabase --service=mydb --passwork=root"

I get the response:

Running Bootstrap Removing default user Setting root password Creating my.ini file Registering service 'Mydb' FATAL ERROR: OpenSCManager failed (5)

(instructions on how to get to here)

Any idea what is going on, or what I can do to get back to some of the old errors I was getting (which might be more informative)?

9 years, 5 months ago Elena Stepanova


If you are running Windows 7 or alike, please make sure you execute the command from a command prompt started as Administrator. Even if you think you are a privileged user, Windows tends to disagree. I'm getting the same error if I start command prompt in a usual way, but if I do it via 'Run as Administrator' option, it looks much better.

9 years, 5 months ago Cristofer Wolz-Romberger

Thanks. Worked like a charm.

Should that be added to this page, for everyone (like me) who misses that little detail?

9 years, 5 months ago Elena Stepanova

It was actually mentioned at mysql_install_db.exe page: "to create a Windows service, mysql_install_db.exe should be run by a user with full administrator privileges (which means elevated command prompt on systems with UAC)."

But I agree that this win-speak might be unclear. I added a note about 'Run as administrator' to mysql_install_db.exe and to this article.

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.