I’d had some difficulty manually creating my own windows service
for MariaDB (worked fine from the installer), but it was due to
the way I was creating it, so I wanted to share the proper
approach:
Old Way:
sc create "maria55" binpath= "\"C:/Program Files/MySQL/MariaDB 5.5/bin/mysqld\"
\"--defaults-file=C:/Program Files/MySQL/MariaDB 5.5/data/my.ini\""
DisplayName= "Maria55" start= "auto"
New Way:
sc create "maria55" binpath= "\"C:/Program Files/MySQL/MariaDB 5.5/bin/mysqld\"
\"--defaults-file=C:/Program Files/MySQL/MariaDB 5.5/data/my.ini\" maria55"
DisplayName= "Maria55" start= "auto"
The key is adding the name, maria55, after the –defaults-file=..
option, but still within the “” that belong to “binpath”.
This extra parameter exists so that mysqld knows whether or not
it was started as a service or not.
Without it, the server does not know, and …
[Read more]