WorkLog Frontpage Log in / Register
High-Level Description | Task Dependencies | High-Level Specification | Low-Level Design | File Attachments | User Comments | Time Estimates | Funding and Votes | Progress Reports

 Windows installer for MariaDB
Title
Task ID55
Queue
Version
Status
Priority
Copies toSergei

Created byPsergey14 Oct 2009Done
Supervisor   
Lead Architect    
Architecture Review  
Implementor  
Code Review  
QA  
Documentation  
 High-Level Description
We need Windows Installer package for MariaDB.
 Task Dependencies
Others waiting for Task 55Task 55 is waiting forGraph
 
 High-Level Specification
The Windows installer in 5.2 will be done using WiX (prerequisite is 
cherrypicking MySQL 5.5 build improvements, as 5.5 also includes an MSI/WiX 
installer).

== Building installer ==
Installer is an optional build target integrated into normal build just like it 
is done in MySQL 5.5

Prerequisite: Wix version 3.0 or later (3.5 or 3.6). Downloadable from codeplex
e.g here http://wix.codeplex.com/releases/view/44406 


devenv mysql.sln /build Relwithdebinfo
devenv mysql.sln /build Relwithdebinfo /project MSI

this produces mariadb-<version>-<architecture>.msi in the build directory

== mysql_install_db.exe ==
One essential component of the new installer will be a new command line utility 
mysql_install_db.exe. This  will replace both complicated method of building an 
installer using pre-made initial database on Unix (which is included into 
source distribution), and non-Windows conform perl tools (mysql_install_db.pl, 
mysql_secure_installation.pl etc). The functionality of mysql_install_db.exe is 
to create a new database. Unlike shell script with the same name on Unix, it 
will include all options necessary to generate a running Windows service, 
as well as initial root password and couple of security options. This makes the 
tool useful in zip-based distributions as well.

Example usages:

- Simplest way to create a database would be 
  mysql_install_db.exe --datadir=C:\data
  
- Create a database in C:\data and creating a service named MariaDB , set root 
password
  (requires elevated administrator to create a service)
  mysql_install_db.exe --datadir=C:\data --password=pass --service=MariaDB
  
Options:
mysql_install_db
  -?, --help          Display this help message and exit.
  -d, --datadir=name  Data directory of the new database
  -s, --service=name  Name of the Windows service
  -p, --password=name Root password
  -P, --port=#        mysql port
  -S, --socket=name   named pipe name (if missing, it will be set the same as
                      service)
  -D, --default-user  Create default user
  -R, --allow-remote-root-access
                      Allows remote access from network for user root
  -N, --skip-networking
                      Do not use TCP connections, use pipe instead


mysql_install_db.exe internally works similarly to Unix shell script (invokes 
mysqld --bootstrap), the difference is that bootstrap SQL script is embedded 
mysql_install_db.exe (in a similar manner as mysql_upgrade does it).
 
== Creating an database during installation == 
Optionally, during installation user can select Database Instance from the 
installer UI feature tree. The location of the "Database Instance" feature will 
determine data directory.
If this feature is selected, user will be presented essential options (mostly 
related to security and database connectivity)  
 service name (default MySQL)
 root password
 port (default 3306)
 enable networking (default yes)
 enable anonymous account (default no)
No other options will be selectable by installer at this point. In the first 
version of this installer, user will have to edit my.ini for other adjustments.
In the future, a GUI wizard-like application might be available.


=== Menu shortcuts ===
If user choses to create a database instance during installation, several 
shortcuts will be creates in the "All Programs" menu
- my.ini ( its target is "notepad.exe <location-of-my.ini>")
- error log ( target is "notepad.exe <location-of-error log>")
- mysql client (as root user)
- command line (target is cmd.exe , PATH is modified to include bin 
directory,   MYSQL_HOME is set to point to database directory)


=== Version upgrades and coexistence ===
- Like in MySQL, MariaDB will install versions that differ in major and minor 
numbers side-by-side, by default into
C:\Program Files\MariaDB<major>.<minor>
(install location is selectable)

Coexistence of versions that differ only in patch versions is not possible, for 
example 5.2.2 will replace 5.2.1 (in Windows installer terms do "major 
upgrade").Major upgrade installation won't have any selectable features.
Downgrades (installing 5.2.1 if 5.2.2 is installed) are prevented.

=== Database instance upgrades ===
Installation procedure will allow to upgrade already existing database 
instances running older MySQL or older MariaDB version.
If appropriate, installer will start Upgrade Wizard (new GUI utility)  at the 
end of  installation. Wizard presents all upgradable services, a checkbox next 
to every service and internally runs new command line utility 
mysql_upgrade_service.exe  to upgrade each selected service.
 
mysql_upgrade_service.exe is a new command-line utility to upgrade database 
instance running as service. It changes service configuration so it point to 
new mysqld.exe,  possibly changes my.ini to make server startable in t he 
version, restarts database and runs mysql_upgrade.

For the above upgrade procedure to work, installer or upgrade wizard needs to 
locate existing database instances. This means, that if people want to migrate 
all existing database to newer version and remove old one, it is much easier 
done in this order 
- install newer version
- do databases upgrade (e.g at the end of installation)
- uninstall old version

This order is important, i.e if "uninstall old version" comes first, it  will 
remove services from the registry, making it impossible to automatically locate 
existing databases during the new installation. 

In the case service information is lost but data is still there, users will 
have to run mysql_upgrade manually. They'll also have to run mysqld --install 
to register db instance as service.


=== 64 bit installer ===
There will be 64 bit installer as well. Both 32 and 64 bit packages can be 
installed on 64 bit machine (they will be installed into different windows64 -
conform 32/64 bit directories, e.g by default into
 C:\Program Files(x86)\MariaDB x.y for 32 bit package, and 
 C:\Program Files\MariaDB x.y for 64 bit package).

Display names for 32 and 64 bit packages in "Add/Remove Programs" will be 
different  ("MariaDB x.y" for 32 bit vs "MariaDB x.y(x64)" for 64 bit package)

=== Uninstall ===
On uninstall, user typically will be asked whether to remove database directory 
if it was created by the installation. Rationale: install/uninstall should be 
able to leave system in unmodified state.

Service that was created during installation is removed as well.If user has 
upgraded database instance(i.e service now runs with different version of 
mariadb server), neither service nor database directory will be removed 
and "Remove database directory" dialog does not appear.

Other database instances that were created outside of installer (e.g with 
mysql_install_db.exe, or as result of running upgrade wizard, are not handled 
during uninstallation (they are "orphaned" after uninstallation, but can be 
reused if a higher version is installed)

In the future versions, on uninstall, in case database instances get orphaned, 
user should be presented with a choice 
  * remove all instances completely including services and data
  * remove only services, retain data
  * start database upgrade wizard to convert instances to higher version (if 
higher version is present)
  * do nothing
  

=== Silent (unattended) installation ===
It will possible to install MariaDB silently, including database instance, 
using standard msi capabitilites. This can come handy for testing '(it does not 
replace UI tests, but it convers 90% of functionality it is very appropriate) 

Silent installation can be invoked using following syntax

msiexec /i <package-name>.msi /qn PARAMETER1=VALUE1 PARAMETER2=VALUE2

(remember to start it as elevated user on Vista+, otherwise it won't do due to 
privilege lack)

Logging is switched on passing extra  /l <logfile> to msiexec's command line,   
for verbose logging use /l*v <logfile>


Parameters that can be passed to msiexec:
INSTALLDIR=<path>  - Install location
DATADIR=<path>     - Location of data directory (default [INSTALLDIR]\data)
SERVICENAME=<string> - Name of the windows service for the created database.
PASSWORD=<string>  - Password of the root user
PORT=<string>      - TCP port

ALLOWREMOTEROOTACCESS=<anystring> - allow remote access for user root
SKIPNETWORKING=<anystring> - do not use TCP (use pipe instead)
DEFAULTUSER=<anystring> - allow anonymous user
CLEANUPDATA="" - on uninstall, do not remove data directory (empty string is 
required, as default is "1" already)

For parameters above described as <anystring>, you can pass any non-empty 
string. Just presence of parameter matters, not the value. As an example 
SKIPNETWORKING=0 and SKIPNETWORKING=1 will have the same effect (no TCP 
access), while ommitting parameter or providing an empty string will allow TCP 
access. 

Those parameters above are MariaDB specific, there are standard MSI ones, 
particularly feature selection that are not described here (feature selection 
is done with ADDLOCAL=<feature>,<feature2> REMOVELOCAL=feature,feature)


Silent uninstall from the command line is done with 
msiexec /i <package>.msi REMOVE=ALL /qn

=== Compatibility with previous installer (NSIS-based) ===
In case NSIS package is installed on the computer, installation will fail and 
tell user to uninstall NSIS based installation. While not strictly necessary, 
having 2 mariadb 5.2 packages in "Add/Remove Program" may appear strange to the 
end user.


=== Differences from MySQL installer === 

* Location of my.ini

MySQL installs it into the installation directory. We install it into database 
directory

Rationale:  Fixed single place of my.ini per installation does not fare well 
with supporting multiple instances.

* Default placement of data directory

Historically, MySQL installed data directory  under the installation directory. 
It has changed in 5.1 to CommonApplication directory allegedly  in order to 
conform to Vista logo requirements. However, this lead to usability problems, 
one of which is different layout of zip and msi package, and second problem was 
that CommonAppDirectory is hidden, which made people quite unhappy when trying 
to fix the problems. 

Hence, we will do it the way it was done in the past. Having data directory 
under ProgramFiles is fine and SQLServer is doing it all the time. Just like 
SQLServer, we'll change data directory ACL to be suitable for placing
data directory ACL to be suitable.

* Security

- Do not install mysql as LocalSystem user (this one is akin to Unix "root" as 
it has far to many privileges). 
  Instead, we install as NetworkService (administrative account, yet with much 
less privileges). SQLServer is running under that user account
  Rationale : reduced privileges.

- ACL on database directory
  When creating database (in installer) we set (inheritable) database directory 
ACL to include user who installs mysql.
  Rationale :
  If we do not do that that ACL is set to elevated Administrators and 
LocalSystem user, which means among other things that
  1) my.ini is readonly for non-elevated administrator
  2) it is not possible to start mysqld from the command line (non-service) 
without elevation
  Also, database directory ACL now includes NetworkService (the user who runs 
the service)
 Low-Level Design
 File Attachments
 NameTypeSizeByDate
 User Comments
 Time Estimates
NameHours WorkedLast Updated
Total0 
 Hrs WorkedProgressCurrentOriginal
Total000
 
 Funding and Votes
Votes: 1: 100%
 Change vote: Useless    Nice to have    Important    Very important    

Funding: 0 offers, total 0 Euro
 Progress Reports
(Wlad - Sat, 29 Jan 2011, 21:28
    
High-Level Specification modified.
--- /tmp/wklog.55.old.23285	2011-01-29 21:28:27.000000000 +0000
+++ /tmp/wklog.55.new.23285	2011-01-29 21:28:27.000000000 +0000
@@ -94,22 +94,34 @@
 Downgrades (installing 5.2.1 if 5.2.2 is installed) are prevented.
 
 === Database instance upgrades ===
-In the initial version, they are not handled by the installer itself, but can 
-be performed manually by user. In the future, a GUI tool (Database Upgrade 
-Wizard) could be designed for this purpose, 
-which could also be launched in MSI installer. 
-
-For example to upgrade a database instance running under MySQL service to 
-different version , following is necessary
-( In cmd.exe as elevated admnistrator)
-
-* stop the service (sc stop MySQL)
-* delete the service (sc delete MySQL)
-* change to the bin directory of the target version (cd C:\Program 
-Files\MariaDB<x>.<y>\bin)
-* Register service (mysqld.exe --install MySQL --defaults-file=<path-to-my.ini>)
-* start the service (sc start MySQL)
-* run mysql_upgrade.exe <path-to-my.ini>
+Installation procedure will allow to upgrade already existing database 
+instances running older MySQL or older MariaDB version.
+If appropriate, installer will start Upgrade Wizard (new GUI utility)  at the 
+end of  installation. Wizard presents all upgradable services, a checkbox next 
+to every service and internally runs new command line utility 
+mysql_upgrade_service.exe  to upgrade each selected service.
+ 
+mysql_upgrade_service.exe is a new command-line utility to upgrade database 
+instance running as service. It changes service configuration so it point to 
+new mysqld.exe,  possibly changes my.ini to make server startable in t he 
+version, restarts database and runs mysql_upgrade.
+
+For the above upgrade procedure to work, installer or upgrade wizard needs to 
+locate existing database instances. This means, that if people want to migrate 
+all existing database to newer version and remove old one, it is much easier 
+done in this order 
+- install newer version
+- do databases upgrade (e.g at the end of installation)
+- uninstall old version
+
+This order is important, i.e if "uninstall old version" comes first, it  will 
+remove services from the registry, making it impossible to automatically locate 
+existing databases during the new installation. 
+
+In the case service information is lost but data is still there, users will 
+have to run mysql_upgrade manually. They'll also have to run mysqld --install 
+to register db instance as service.
+
 
 === 64 bit installer ===
 There will be 64 bit installer as well. Both 32 and 64 bit packages can be 
@@ -127,14 +139,14 @@
 able to leave system in unmodified state.
 
 Service that was created during installation is removed as well.If user has 
-upgraded database instance(e.g service now runs with different version of 
+upgraded database instance(i.e service now runs with different version of 
 mariadb server), neither service nor database directory will be removed 
-and "Remove database directory" dialog does not appear
+and "Remove database directory" dialog does not appear.
 
 Other database instances that were created outside of installer (e.g with 
-mysql_install_db.exe, or as result of upgrade as described in "Database 
-Instance upgrades") are not handled during uninstallation (they are "orphaned" 
-after uninstallation, but can be reused if a higher version is installed)
+mysql_install_db.exe, or as result of running upgrade wizard, are not handled 
+during uninstallation (they are "orphaned" after uninstallation, but can be 
+reused if a higher version is installed)
 
 In the future versions, on uninstall, in case database instances get orphaned, 
 user should be presented with a choice 

(Sergei - Wed, 19 Jan 2011, 16:04
    
Observers changed: Sergei

(Wlad - Fri, 14 Jan 2011, 13:26
    
High-Level Specification modified.
--- /tmp/wklog.55.old.7799	2011-01-14 13:26:32.000000000 +0000
+++ /tmp/wklog.55.new.7799	2011-01-14 13:26:32.000000000 +0000
@@ -171,7 +171,7 @@
 ALLOWREMOTEROOTACCESS=<anystring> - allow remote access for user root
 SKIPNETWORKING=<anystring> - do not use TCP (use pipe instead)
 DEFAULTUSER=<anystring> - allow anonymous user
-CLEANUPDATA= - on uninstall, do not remove data directory (empty parameter is 
+CLEANUPDATA="" - on uninstall, do not remove data directory (empty string is 
 required, as default is "1" already)
 
 For parameters above described as <anystring>, you can pass any non-empty 

(Wlad - Wed, 12 Jan 2011, 20:06
    
High-Level Specification modified.
--- /tmp/wklog.55.old.18977	2011-01-12 20:06:47.000000000 +0000
+++ /tmp/wklog.55.new.18977	2011-01-12 20:06:47.000000000 +0000
@@ -111,6 +111,15 @@
 * start the service (sc start MySQL)
 * run mysql_upgrade.exe <path-to-my.ini>
 
+=== 64 bit installer ===
+There will be 64 bit installer as well. Both 32 and 64 bit packages can be 
+installed on 64 bit machine (they will be installed into different windows64 -
+conform 32/64 bit directories, e.g by default into
+ C:\Program Files(x86)\MariaDB x.y for 32 bit package, and 
+ C:\Program Files\MariaDB x.y for 64 bit package).
+
+Display names for 32 and 64 bit packages in "Add/Remove Programs" will be 
+different  ("MariaDB x.y" for 32 bit vs "MariaDB x.y(x64)" for 64 bit package)
 
 === Uninstall ===
 On uninstall, user typically will be asked whether to remove database directory 

(Wlad - Wed, 12 Jan 2011, 19:54
    
High-Level Specification modified.
--- /tmp/wklog.55.old.17885	2011-01-12 19:54:45.000000000 +0000
+++ /tmp/wklog.55.new.17885	2011-01-12 19:54:45.000000000 +0000
@@ -155,6 +155,7 @@
 Parameters that can be passed to msiexec:
 INSTALLDIR=<path>  - Install location
 DATADIR=<path>     - Location of data directory (default [INSTALLDIR]\data)
+SERVICENAME=<string> - Name of the windows service for the created database.
 PASSWORD=<string>  - Password of the root user
 PORT=<string>      - TCP port
 
@@ -170,6 +171,21 @@
 access), while ommitting parameter or providing an empty string will allow TCP 
 access. 
 
+Those parameters above are MariaDB specific, there are standard MSI ones, 
+particularly feature selection that are not described here (feature selection 
+is done with ADDLOCAL=<feature>,<feature2> REMOVELOCAL=feature,feature)
+
+
+Silent uninstall from the command line is done with 
+msiexec /i <package>.msi REMOVE=ALL /qn
+
+=== Compatibility with previous installer (NSIS-based) ===
+In case NSIS package is installed on the computer, installation will fail and 
+tell user to uninstall NSIS based installation. While not strictly necessary, 
+having 2 mariadb 5.2 packages in "Add/Remove Program" may appear strange to the 
+end user.
+
+
 === Differences from MySQL installer ===
 
 * Location of my.ini

(Wlad - Wed, 12 Jan 2011, 19:41
    
High-Level Specification modified.
--- /tmp/wklog.55.old.17435	2011-01-12 19:41:20.000000000 +0000
+++ /tmp/wklog.55.new.17435	2011-01-12 19:41:20.000000000 +0000
@@ -136,6 +136,39 @@
   * do nothing
   
 
+=== Silent (unattended) installation ===
+It will possible to install MariaDB silently, including database instance, 
+using standard msi capabitilites. This can come handy for testing '(it does not 
+replace UI tests, but it convers 90% of functionality it is very appropriate) 
+
+Silent installation can be invoked using following syntax
+
+msiexec /i <package-name>.msi /qn PARAMETER1=VALUE1 PARAMETER2=VALUE2
+
+(remember to start it as elevated user on Vista+, otherwise it won't do due to 
+privilege lack)
+
+Logging is switched on passing extra  /l <logfile> to msiexec's command line,   
+for verbose logging use /l*v <logfile>
+
+
+Parameters that can be passed to msiexec:
+INSTALLDIR=<path>  - Install location
+DATADIR=<path>     - Location of data directory (default [INSTALLDIR]\data)
+PASSWORD=<string>  - Password of the root user
+PORT=<string>      - TCP port
+
+ALLOWREMOTEROOTACCESS=<anystring> - allow remote access for user root
+SKIPNETWORKING=<anystring> - do not use TCP (use pipe instead)
+DEFAULTUSER=<anystring> - allow anonymous user
+CLEANUPDATA= - on uninstall, do not remove data directory (empty parameter is 
+required, as default is "1" already)
+
+For parameters above described as <anystring>, you can pass any non-empty 
+string. Just presence of parameter matters, not the value. As an example 
+SKIPNETWORKING=0 and SKIPNETWORKING=1 will have the same effect (no TCP 
+access), while ommitting parameter or providing an empty string will allow TCP 
+access. 
 
 === Differences from MySQL installer ===
 

(Wlad - Wed, 12 Jan 2011, 17:40
    
Implementor updated: Bothorsen -> Wlad

(Wlad - Wed, 12 Jan 2011, 17:31
    
High-Level Specification modified.
--- /tmp/wklog.55.old.11549	2011-01-12 17:31:24.000000000 +0000
+++ /tmp/wklog.55.new.11549	2011-01-12 17:31:24.000000000 +0000
@@ -1,88 +1,183 @@
-Not a spec so far but a list of points to consider:
-
-1. Installer wishlist (user POV)
---------------------------------
-From the user point of view:
-
-1.1 Step 1: simple installer 
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-An installer package that 
-- Presents the user with GPL licence
-- Prompts the user for "essential" configuration options:
-  * Install directory
-   - Data directory (see email from Peter Laursen on maria-developers@ dated
-     14-10-2009 about data directory, Vista and UAC)
-  * root password
-  * default character set
-  * [possibly] sql_mode setting.
-- Checks if the target installation directory, TCP port, or named pipe are 
-  busy. If they are, offers to either change these parameters or abort the
-  installation (that is: no support for any kind of upgrades at this point)
-- Copies installation files to appropriate destination
-- Registers mysqld a service
-- Generates appropriate my.cnf file
-- Sets up SQL root user with the specified password
-- Adds start menu items
-   - to start the server manually (with --console)
-     (note: starting server manually requires write access to datadir, which
-      not all users will have. what to do?)
-   - to start mysql client
-   - to edit the my.cnf file.
-- Registers MariaDB to start as a service with the specified parameters.
-- Registers MariaDB as installed software, sets up uninstaller.
-  (TODO: should the uninstaller the datadir or leave it? (or ask the user?))
-
-- Creates installation log, and in case of any failures presents the log to
-  the user and requests to file it as a bug (How far we should go here depends
-  on how complex and error-prone the final installation procedure will be).
-
-1.2 Step 2: Upgrades from MySQL or MariaDB
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- Same as above but with handling of the case where MySQL has been already
-  installed:
-  - offer to replace MySQL.
-  - upgrade the data directory (todo we should sort out if anything/what is
-    needed for this).
-  - Uninstall MySQL
-  - Install MariaDB.
-
-1.3 Step 3: Configuration wizard
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- Installer should include configuration wizard that's similar to what MySQL 
-  installer does.
-  TODO come up with a list of options to set.
-
-1.4 Items not on the wishlist
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-This is a list of things that one might want an installer to do but that are 
-out of scope of this WL entry:
-* Calibration of my.cnf parameters based on available memory, number of CPUs,
-  etc.
-
-
-2. Installer wishlist (developer POV)
--------------------------------------
-* Some "installshield-like" tool that's easy to use (suggestion by Webyog: 
-  NSIS)
-* Installation procedure source should reside in MariaDB source repository
-* Installation procedure source file is better to be in human-readable text 
-  format.
-* It should be possible to automate creation of the installer package, in a way
-  that can be run from buildbot (e.g. the installer package build process
-  should print messages to its stdout)
-
-* Any suggestions on how can one automatically test the installation package? 
-  (for example, we'll want to start the installer, install, check that
-  installation succeeded, then start the server, run some commands, then
-  uninstall. Any ways to achieve that?)
-
-3. Other notes
---------------
-* MariaDB's logo is the seal. It can be found here:
-  http://askmonty.org/wiki/index.php/MariaDB_Logo
-* We should make both 32-bit installer and 64-bit installer (the 
-  latter will be possible when we have 64-bit windows binaries)
-* At this point we don't see a need to force a reboot after the installation.
-* The installer should be Vista and Windows7-proof.
-
+The Windows installer in 5.2 will be done using WiX (prerequisite is 
+cherrypicking MySQL 5.5 build improvements, as 5.5 also includes an MSI/WiX 
+installer).
+
+== Building installer ==
+Installer is an optional build target integrated into normal build just like it 
+is done in MySQL 5.5
+
+Prerequisite: Wix version 3.0 or later (3.5 or 3.6). Downloadable from codeplex
+e.g here http://wix.codeplex.com/releases/view/44406 
+
+
+devenv mysql.sln /build Relwithdebinfo
+devenv mysql.sln /build Relwithdebinfo /project MSI
+
+this produces mariadb-<version>-<architecture>.msi in the build directory
+
+== mysql_install_db.exe ==
+One essential component of the new installer will be a new command line utility 
+mysql_install_db.exe. This  will replace both complicated method of building an 
+installer using pre-made initial database on Unix (which is included into 
+source distribution), and non-Windows conform perl tools (mysql_install_db.pl, 
+mysql_secure_installation.pl etc). The functionality of mysql_install_db.exe is 
+to create a new database. Unlike shell script with the same name on Unix, it 
+will include all options necessary to generate a running Windows service, 
+as well as initial root password and couple of security options. This makes the 
+tool useful in zip-based distributions as well.
+
+Example usages:
+
+- Simplest way to create a database would be 
+  mysql_install_db.exe --datadir=C:\data
+  
+- Create a database in C:\data and creating a service named MariaDB , set root 
+password
+  (requires elevated administrator to create a service)
+  mysql_install_db.exe --datadir=C:\data --password=pass --service=MariaDB
+  
+Options:
+mysql_install_db
+  -?, --help          Display this help message and exit.
+  -d, --datadir=name  Data directory of the new database
+  -s, --service=name  Name of the Windows service
+  -p, --password=name Root password
+  -P, --port=#        mysql port
+  -S, --socket=name   named pipe name (if missing, it will be set the same as
+                      service)
+  -D, --default-user  Create default user
+  -R, --allow-remote-root-access
+                      Allows remote access from network for user root
+  -N, --skip-networking
+                      Do not use TCP connections, use pipe instead
+
+
+mysql_install_db.exe internally works similarly to Unix shell script (invokes 
+mysqld --bootstrap), the difference is that bootstrap SQL script is embedded 
+mysql_install_db.exe (in a similar manner as mysql_upgrade does it).
+ 
+== Creating an database during installation == 
+Optionally, during installation user can select Database Instance from the 
+installer UI feature tree. The location of the "Database Instance" feature will 
+determine data directory.
+If this feature is selected, user will be presented essential options (mostly 
+related to security and database connectivity)  
+ service name (default MySQL)
+ root password
+ port (default 3306)
+ enable networking (default yes)
+ enable anonymous account (default no)
+No other options will be selectable by installer at this point. In the first 
+version of this installer, user will have to edit my.ini for other adjustments.
+In the future, a GUI wizard-like application might be available.
+
+
+=== Menu shortcuts ===
+If user choses to create a database instance during installation, several 
+shortcuts will be creates in the "All Programs" menu
+- my.ini ( its target is "notepad.exe <location-of-my.ini>")
+- error log ( target is "notepad.exe <location-of-error log>")
+- mysql client (as root user)
+- command line (target is cmd.exe , PATH is modified to include bin 
+directory,   MYSQL_HOME is set to point to database directory)
+
+
+=== Version upgrades and coexistence ===
+- Like in MySQL, MariaDB will install versions that differ in major and minor 
+numbers side-by-side, by default into
+C:\Program Files\MariaDB<major>.<minor>
+(install location is selectable)
+
+Coexistence of versions that differ only in patch versions is not possible, for 
+example 5.2.2 will replace 5.2.1 (in Windows installer terms do "major 
+upgrade").Major upgrade installation won't have any selectable features.
+Downgrades (installing 5.2.1 if 5.2.2 is installed) are prevented.
+
+=== Database instance upgrades ===
+In the initial version, they are not handled by the installer itself, but can 
+be performed manually by user. In the future, a GUI tool (Database Upgrade 
+Wizard) could be designed for this purpose, 
+which could also be launched in MSI installer. 
+
+For example to upgrade a database instance running under MySQL service to 
+different version , following is necessary
+( In cmd.exe as elevated admnistrator)
+
+* stop the service (sc stop MySQL)
+* delete the service (sc delete MySQL)
+* change to the bin directory of the target version (cd C:\Program 
+Files\MariaDB<x>.<y>\bin)
+* Register service (mysqld.exe --install MySQL --defaults-file=<path-to-my.ini>)
+* start the service (sc start MySQL)
+* run mysql_upgrade.exe <path-to-my.ini>
+
+
+=== Uninstall ===
+On uninstall, user typically will be asked whether to remove database directory 
+if it was created by the installation. Rationale: install/uninstall should be 
+able to leave system in unmodified state.
+
+Service that was created during installation is removed as well.If user has 
+upgraded database instance(e.g service now runs with different version of 
+mariadb server), neither service nor database directory will be removed 
+and "Remove database directory" dialog does not appear
+
+Other database instances that were created outside of installer (e.g with 
+mysql_install_db.exe, or as result of upgrade as described in "Database 
+Instance upgrades") are not handled during uninstallation (they are "orphaned" 
+after uninstallation, but can be reused if a higher version is installed)
+
+In the future versions, on uninstall, in case database instances get orphaned, 
+user should be presented with a choice 
+  * remove all instances completely including services and data
+  * remove only services, retain data
+  * start database upgrade wizard to convert instances to higher version (if 
+higher version is present)
+  * do nothing
+  
+
+
+=== Differences from MySQL installer ===
+
+* Location of my.ini
+
+MySQL installs it into the installation directory. We install it into database 
+directory
+
+Rationale:  Fixed single place of my.ini per installation does not fare well 
+with supporting multiple instances.
+
+* Default placement of data directory
+
+Historically, MySQL installed data directory  under the installation directory. 
+It has changed in 5.1 to CommonApplication directory allegedly  in order to 
+conform to Vista logo requirements. However, this lead to usability problems, 
+one of which is different layout of zip and msi package, and second problem was 
+that CommonAppDirectory is hidden, which made people quite unhappy when trying 
+to fix the problems. 
+
+Hence, we will do it the way it was done in the past. Having data directory 
+under ProgramFiles is fine and SQLServer is doing it all the time. Just like 
+SQLServer, we'll change data directory ACL to be suitable for placing
+data directory ACL to be suitable.
+
+* Security
+
+- Do not install mysql as LocalSystem user (this one is akin to Unix "root" as 
+it has far to many privileges). 
+  Instead, we install as NetworkService (administrative account, yet with much 
+less privileges). SQLServer is running under that user account
+  Rationale : reduced privileges.
+
+- ACL on database directory
+  When creating database (in installer) we set (inheritable) database directory 
+ACL to include user who installs mysql.
+  Rationale :
+  If we do not do that that ACL is set to elevated Administrators and 
+LocalSystem user, which means among other things that
+  1) my.ini is readonly for non-elevated administrator
+  2) it is not possible to start mysqld from the command line (non-service) 
+without elevation
+  Also, database directory ACL now includes NetworkService (the user who runs 
+the service)
 

(Sergei - Sat, 24 Jul 2010, 11:39
    
Status updated.
--- /tmp/wklog.55.old.28887	2010-07-24 11:39:12.000000000 +0000
+++ /tmp/wklog.55.new.28887	2010-07-24 11:39:12.000000000 +0000
@@ -1 +1 @@
-Assigned
+In-Progress

(Knielsen - Fri, 14 May 2010, 06:45
    
Version updated.
--- /tmp/wklog.55.old.18466	2010-05-14 06:45:38.000000000 +0000
+++ /tmp/wklog.55.new.18466	2010-05-14 06:45:38.000000000 +0000
@@ -1 +1 @@
-Server-9.x
+Server-5.1
-- View All Progress Notes (27 total) --


Report Generator:
 
Saved Reports:

WorkLog v4.0.0
  © 2010  Sergei Golubchik and Monty Program AB
  © 2004  Andrew Sweger <yDNA@perlocity.org> and Addnorya
  © 2003  Matt Wagner <matt@mysql.com> and MySQL AB