#651158 spip: Package should prepare a MySql DB for spip

#651158#5
Date:
2011-12-06 10:18:47 UTC
From:
To:
Hi.

AFAICT, there's nothing ready after installation, DB wise.

The package depends on MySQL, and the /spip/ecrire process requires connection to a DB with appropriate login/pass... still, the admin has to manage the creation of such a user and so on.

So at least one would expect directives in README.Debian on how to do so, or even better, a use of db-config to prepare the necessary steps WRT to the MySQL server.

Thanks in advance.

Best regards,

#651158#10
Date:
2011-12-06 10:31:16 UTC
From:
To:
Btw, the mysql instructions could be :
# mysqladmin -u root -p create spip
Enter password:
# mysql -u root -p  spip
Enter password:

mysql> GRANT ALL ON spip.* TO spip@localhost IDENTIFIED BY 'yourownsecretpass';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

But YMMV...

Best regards,

#651158#15
Date:
2011-12-06 16:47:51 UTC
From:
To:
(For the records, this was in the context of #612467 :)

See #612467 for my proposal, which somehow addresses documentation of
the DB creation parts.

Regarding documentation in README.Debian, I guess #612467 is the place
yes.

Now, about db-config use or not : I think it may be very likely that
most users installing spip with Debian packages would expect at least
one default instance to be auto-configured, or installed through the
most minimal set of additional operations needed after apt has
completed.

Most likely, the /ecrire part is unavoidable given that SPIP already
handles this, and things shouldn't be duplicated in the maintainer
scripts.

But creating a DB for the 'default' instance, should, in my opinion, be
made as automatic as possible.

I think a possible way could be to ask in the config, first if the user
wants to create a a DB automatically in MySQL (through db-config),
letting her the option to decline, and proceed manually. That latter
option would then naturally fit the needs of the (most probably fewer)
users needing multi-hosting.

That's the way it is done for fusionforge (if you need a reference
implementation), and suits most cases, IMHO.

Hope this helps.

Best regards,