[MDEV-7021] mysql_install_db.exe does not allow to specify template file for mysqld/mariadbd settings Created: 2014-11-04 Updated: 2022-03-07 Resolved: 2020-05-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Platform Windows |
| Fix Version/s: | 10.6.0 |
| Type: | Task | Priority: | Major |
| Reporter: | VAROQUI Stephane | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
When upgrading from MySQL to MariaDB on windows from the Zip file it would be convenient to to create the windows service with an existing configuration file that could be pass by a new --defaults-file option Other than that the my.ini will be set to the basedir or on dummy datadir pass to the mysql_install_db.exe command |
| Comments |
| Comment by Elena Stepanova [ 2015-11-01 ] | ||
|
I'm still not quite sure why it is a bug, but since serg switched it to one twice, I assume it is. | ||
| Comment by Vladislav Vaintroub [ 2015-11-03 ] | ||
|
My guess is that stephane@skysql.com is asking mostly for the functionality we have in mysql_upgrade_service.exe , which is not about creating a completely new database but to change a windows service to run under mysqld.exe from another installation . we also run mysql_upgrade, so the user does not have to do it afterwards. The reason I chose not to provide this functionality for non-service instances is that it is impossible to figure out how this database is actually run. We cannot just lookup for the batch file used to start the database and change the path of mysqld.exe there. With Windows service everything is clear, all stuff we know about this particular instance is in the service config, and in the defaults file. On the other hand maybe I'm mistaken and Stephane is asking for a "template" my.ini for the new installation, so the user does not have to modify it post-install. This might be a valid request for enhancement Asking stephane@skysql.com for clarification. | ||
| Comment by VAROQUI Stephane [ 2015-11-03 ] | ||
|
Correct i use zip install to enable 2 services running on the same datadir , so that the user can switch from mysql to mariadb and back . | ||
| Comment by Vladislav Vaintroub [ 2015-11-03 ] | ||
|
Thanks for the clarificaton! Without upgrade it seems a bit dangerous just registering the service can be done in several ways, the simplest of which is when mysqld.exe registers the service itself https://dev.mysql.com/doc/refman/5.7/en/windows-start-service.html mentions this
Also , Windows utility sc.exe can be used . ccalender wrote a blog about it, http://www.chriscalender.com/syntax-for-creating-a-windows-service-for-mysql-when-there-are-2-paths-which-both-contain-spaces/ ( it can get funny with spaces in path) So registring service itself does not seem to be a big deal? | ||
| Comment by VAROQUI Stephane [ 2015-11-04 ] | ||
|
Thanks for the links | ||
| Comment by Vladislav Vaintroub [ 2020-05-12 ] | ||
|
The tricky part of that is to ensure that file permissions are correct, no matter which weird options for directory and file placement are in custom my.ini BTW I hesitate to call the new parameter --defaults-file, the unix script, to which this tool does not need to be compatible even, uses --defaults-file in the most surprising way possible, breaking all user expectations of what --defaults-file does. hholzgra , you may want to comment on that | ||
| Comment by Vladislav Vaintroub [ 2020-05-18 ] | ||
|
the new parameter is called --config. it points to a "template" config file, which is still copied into datadir, and possibly modified by adding various things like port and such. | ||
| Comment by Ian Gilfillan [ 2020-12-23 ] | ||
|
Created MDEV-24478 to document this. |