← Back to team overview

maria-developers team mailing list archive

Re: Windows installer, part 2


"and additionally to run the program in user session you need elevation."
No. I can start MySQL (installed with a recent MySQL installer like 5.1.39 -
or just a zip/no-install distribution) as a user with the command '<path
to>\basedir\bin\mysqld --defaults-file <path to>my.ini.  But if UAC is ON
and  the cmd.exe session was not started with explicit 'run as
administrator' option the server will write to user's \virtualstore folder
and *NOT *to the 'datadir' defined in server configuration. That is the
problem in my understanding. It results in two different copies of the
database files.
Actually I agree with your 'preaching' (at least as an option for live
servers running on a Windows server platform).  But I do not think such
change between MySQL and MariaDB should be implemented in current stage. I
am in favor building a rather simple 'skeleton' doing what is required for
Windows - uninstaller, PCA compability, start menu items, registering
service correctly etc. - (but not all what is required for MySQL/MariaDB in
the first place) that can be detailed.
On Mon, Oct 19, 2009 at 23:52, Vladislav Vaintroub <wlad@xxxxxxx> wrote:

> From: Peter Laursen [mailto:peter_laursen@xxxxxxxxxx]
> Sent: Monday, October 19, 2009 10:35 PM
> To: Vladislav Vaintroub
> Cc: Sergey Petrunya; Henrik Ingo; maria-developers@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Maria-developers] Windows installer, part 2
> >I am only trying to get attention to what may happen if 3 conditions are
> met:
> >1) UAC is ON
> >2) server is installed to program files
> >3) server is sometimes started as a service and sometimes as a user
> program
> In normal mysql it looks like this:
> the datadir directory that is created as part of installation has following
> ACLs:
> CreatorOwner (SYSTEM),Administrators = Full Control
> Users = Read Only.
> With ACLs set like this it is impossible to run the program without admin
> account, and additionally to run the program in user session you need
> elevation.
> There is no UAC/elevation for services, so services run but again only
> under administrative account.
> One way to resolve this is user to create user mysqluser, group mysql, add
> the user who installs MySQL to the group and set the ACLs on the datadir so
> that group has full control. This is what I'm preaching all the time, I have
> tested this scenario and it works fine and there is no need for elevation.
> It is probably another way to get this running and escape the need of
> elevation, but I'm not aware about it (I'm pretty sure no one wants to give
> every user read/write on this directory, as was suggested here
> http://bugs.mysql.com/bug.php?id=38373 )
> The above would of course apply to MariaDB as well.
> >I am still awaiting comments to my outline of how work on an installer
> could be started earlier in this thread.
> I would perhaps be a bit more careful the about the early choice of NSIS as
> the installer tool. I admit being quite uninformed about NSIS and I never
> used it myself, but my impression after reading about NSIS was that  it is
> great for copying files and everything that goes beyond copying is not
> trivial (maybe  with the exception of starting an exe) . Everything else is
> done with crude Win32 API scripting, or with one of the numerous
> non-standard plugins. Again, it was just an impression after reading about
> it and not the fact of life. Please correct me if I'm wrong here.  Also, is
> that it is a custom exe installer and it is not the standard recommended by
> OS vendor (MSI is standard). Have you thought about using WiX?

Follow ups