I installed mariadb via configuration.nix
. For the installation I made the following entries in my configurastions.nix
.
services.mysql.enable = true;
services.mysql.package = pkgs.mariadb;
services.longview.mysqlPasswordFile = "/run/keys/mysql.password";
After I upgraded my system I get this error:
warning: The option definition services.mysql.rootPassword' in/etc/nixos/configuration.nix’ no longer has any effect; please remove it. Use socket authentication or set the password outside of the nix store.
Before I always set my password in the configuration.nix
with:
services.mysql.rootPassword
I also does a simple systemctl start mysql
. However I get the following error message under systemctl status mysql
:
● mysql.service - MySQL Server
Loaded: loaded (/nix/store/2aliiwch37wiis98q6nbplcwyqk987l5-unit-mysql.service/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: signal) since Mon 2019-08-12 00:45:56 CEST; 15min ago
Process: 4784 ExecStartPre=/nix/store/bg6p3jcw23xmag07nzakkqh5hmy0h5yn-unit-script-mysql-pre-start (code=exited, status=0/SUCCESS)
Process: 4785 ExecStart=/nix/store/r8s4kw7wskyn73ksb5nm9a5ykmyxk5ca-mariadb-10.3.15/bin/mysqld --defaults-file=/etc/my.cnf --user=mysql --datadir=/var/lib/mysql --basedir=/nix/store/r8s4kw7wskyn73ksb5nm9a5ykmyxk5ca-mariadb-10.3.15 $_WS>
Process: 4820 ExecStartPost=/nix/store/hvfnmysk0hrgfp8pzr19r9sv0np88d1g-mysql-setup (code=exited, status=0/SUCCESS)
Main PID: 4785 (code=killed, signal=ABRT)
Status: "Taking your SQL requests now…"
With a mysql
or mysql -u root -p
I get the following error message:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)
Would be grateful for any help.