1

In the past I used to setup MySQL/MariaDB manually on Windows boxes but don't remember exactly how. I unzip the .msi file and put every binary file into the desired place. I write a custom my.ini file including required InnoDB settings like autoextend but also log directory. Now I want to generate the mysql defaults database. According to the documentation it's not possible to provide the mysql_install_db.exe tool with a path to the my.ini file. All files are generated into a single folder including a my.ini file I don't need.

How do I generate the database manually into my individual folder hierarchy?

1 Answer 1

1

I call mysql_install_db.exe with the correct --datadir argument and root password and have all files generated. I call mysqld --remove to delete the windows service. I call mysqld --install-manual [ServiceName] --defaults-extra-file=my.ini to finally set up the service using my very own my.ini file. When this service is started up for the first time using net start the innodb-files are created freshly in the folders defined in the my.ini file. The system database mysql uses myisam table format and had not touched the innodb files.

1
  • mysql_install_db.exe does not create service if you do not ask for one, so you can skip mysqld --remove step Commented Sep 30, 2017 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.