l...@gnu.org (Ludovic Courtès) writes:

> Hello!
>
> 宋文武 <iyzs...@gmail.com> skribis:
>
>> * gnu/services/database.scm (<mysql-configuration>): New record type.
>> (%mysql-accounts, mysql-service-type): New variables.
>> (mysql-configuration-file, %mysql-activation, mysql-shepherd-services)
>> (mysql-services): New procedures.
>> * doc/guix.texi (Database Services): Document it.
>
> [...]
>
>> +@deffn {Scheme Procedure} mysql-service [#:config (mysql-configuration)]
>> +Return a service that runs @command{mysqld}, the MySQL database server.
>
> s/MySQL/MySQL or MariaDB/
OK.

>
>> +@deftp {Data Type} mysql-configuration
>> +Data type representing the configuration of @var{mysql-service}.
>> +
>> +@table @asis
>> +@item @code{mysql} (default: @var{mariadb})
>> +Package object of the MySQL database server, can be either @var{mariadb}
>> +or @var{mysql}.
>> +@end table
>> +@end deftp
>
> Do you have plans to extend this type eventually?
Not yet, should I use a simple keywoard argument instead?

>
>> +(define (%mysql-activation config)
>
> Please add a docstring.  IIUC it initializes the ‘mysql’ database for
> user ‘mysql’, and that database contains configuration info, right?
Yes, it does what ‘mysql_install_db’ and ‘mysql_secure_installation’
do (which doesn’t work directly now due to missing coreutils, etc.
in PATH).

And now I realize that this doesn't work for mysql,
I need to rename this to ‘%mariadb-activation’ and write
another ‘%mysql-activation’.

>
> Otherwise LGTM!
>
> If you want, it would be awesome if you could come up with a (gnu tests
> databases) module that would run a GuixSD with the mysql service, and
> then spawn a mysql client to make sure the basics work as expected.
>
Sure, I’ll look that later.

Reply via email to