On my NixOS 17.09 system, I've installed mariadb
, by listing the package in my /etc/nixos/configuration.nix
and nixos-rebuild
ing.
The binaries now seem to be present, but the mariadb database service doesn't seem to be running. How can I start it?
I tried
$ sudo systemctl start mariadb
Failed to start mariadb.service: Unit mariadb.service not found.
$ sudo systemctl start mysql
Failed to start mysql.service: Unit mysql.service not found.
$ sudo mysqld start
2017-11-06 11:39:35 140359451949120 [Note] mysqld (mysqld 10.1.28-MariaDB) starting as process 2823 ...
2017-11-06 11:39:35 140359451949120 [Warning] Can't create test file /var/lib/mysql/nixos.lower-test
mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 2 "No such file or directory")
2017-11-06 11:39:35 140359451949120 [ERROR] Aborting