[Dbconfig-common-devel] Re: dbconfig-common - short question

sean finney seanius at debian.org
Tue Feb 7 18:33:28 UTC 2006


hi marcin,

fyi, i'm cc'ing this to the dbconfig-common discussion list...

On Tue, Feb 07, 2006 at 05:09:30PM +0100, Marcin Antczak wrote:
> But I would like to make it very easy to end user. And I also would like to
> make it installable 'from scratch'.
> I mean for user that doesn't have mysql-server installed.

the easiest way to do that would be to have your package depend
on the mysql-server... but i would strongly advise against it,
and instead mention mysql-server as a Recommends or Suggests,
and also say something in the Package description like:

 <rest of long description>
 .
 This package requires access to a functioning mysql system.  If you
 do not plan on using a remote mysql system then you should install the
 mysql-server package first.

... or something like that.

> The problem is that if I add mysql-server as dependency then my package
> won't install properly.
> Because I need to add admin password for mysql admin first.

why do you need the admin password for mysql?  if you are using
dbconfig-common, and your db app just needs to perform some
basic sql code execution as admin, dbconfig-common will already
take care of that for you.  a little more information would
be very helpful to answer this further.

> So, I need to install mysql-server, then mysqladmin -u root password
> somepassword

you definitely do not want to go changing the mysql root password.
that would make a lot of people angry...

> The problem is that in Ubuntu - and propably in Debian, too - mysql-server
> is installed as service/daemon
> and install scripts generates default password and admin account that is
> different than 'root'.

yes... the root account still exists as well though.

> In ubuntu mysql-sever create small file in /etc/mysql/debian.cnf with some
> settings - admin user: debian-sys-maint, and with autogenerated password.
> 
> I seems logical that if I want to automate my package then I can use
> debian-sys-maint as dbc_dbadmin, and set into
> /etc/dbconfig-common/packagename.conf.

i've considered using the debian-sys-maint account before, but
every time i do, i end up deciding not to because the local
admin may have modified and/or removed it.  one option which
might be a good compromise would be to have an extra question like
"should i use the debian maintainance account?" built-in to
dbc, so the admin is given the choice.

> So my question is: Is there any way to pass admin password to
> dbconfig-common from script without calling debconf and without any user
> interaction?

if we did what i mention above, it could be built into
dbc to copy/use the debian-sys-maint file and pass it internally
to all mysql-related calls... but this is of course unwritten.


regards,
	sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/dbconfig-common-devel/attachments/20060207/90f5978f/attachment.pgp


More information about the Dbconfig-common-devel mailing list