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

sean finney seanius at debian.org
Wed Feb 8 06:43:35 UTC 2006


hi  marcin,

On Tue, Feb 07, 2006 at 10:18:54PM +0100, Marcin Antczak wrote:
> Well it is logical but it's pretty complicated for many users. The problem
> is that we don't have an option to choose between local and remote server.

actually, there is an option to use a remote host, but you only see it
if you have the debconf priority set to low.  i think you also get it
if you dpkg-reconfigure your package later.  if not, then there's
a bug hiding half the code of dbconfig from being used :)

> And while we don't have something like 'conditional dependency' in debian or
> ubuntu it is pretty confusing.
> 
> We can set mysql-server as dependency but this will reduce an ability to use
> database on remote host.

i think what would be very helpful for such siuations would be simply an
informative error message.  the way dbc is designed, if there's an
error it prevents the package from installing by default (this can
be overridden), so if they had to stop and install mysql-server
first they could start where they left off with the other
package afterwards.  the only thing that's missing is the error
message saying "you're trying to install on the local host but
mysql server isn't installed!".  additionally, we could do some
smarter autodetection during the run of the config script such that
if mysql isn't detected it makes sure that all the remote host
questions get shown.  what do you think?

> My app doesn't need to perform sql code as admin - admin password is
> required on installation stage.
> I need admin app to create database for my app. This is why I want to use
> password taken from /etc/mysql/debian.cnf

ah, but if you use dbc, you don't need to worry about creating the
database.  you juse need to supply the sql code that creates the
tables inside the database, and dbc will automatically create the
db, and "db user" (which can even be specified by the admin),
then it connects using the dbuser's credentials and runs the
sql code.

> Well but by default dbc_dbadmin is 'root' so I need root password to
> database if I want to setup database.

yes, it's needed, but that doesn't mean you need to change it!

> So, what's your opinion about it? What do you think about patches?

patches are always welcome :)

> apt-get install cacti
> 
> I get questions about password for user cacti (in fact I even don't know
> that it's cacti - I know that because I know dbconfig-common sources and
> documentation)

you should get a question about the root user's password too, shouldn't
you?


> And... that's it - package is installed - no questions about remote host, no
> question about mysql-server on localhost. Script will simple install cacti
> but then suddenly when trying to run this application on
> http://localhost/cacti user get a bunch of warnings:

you dn't get any error during installation of cacti's sql code?  you
should get an error like 

 sorry, we encountered the following error:

 MYSQL: NNNN unable to connect to mysql server on localhostwhat

 would you like to retry, retry with new configuration, abort, or
 ignore?

what version of cacti are you using?  if you're using the version in
sarge, it doesn't use dbc at all.  if you're using a later version,
then there's some problem :)


	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/20060208/4a2fdf8e/attachment.pgp


More information about the Dbconfig-common-devel mailing list