Ho cambiato la directory nel file di cnf,
ma da sempre lo stesso errore, qundo provo ad avviare il db:
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
questi sono i detagli:
systemctl status mariadb.service
? mariadb.service - MariaDB 10.1.37 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2018-11-27 14:31:46 GMT; 3min 18s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 779 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
Process: 699 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
Process: 695 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 692 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 779 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Nov 27 14:31:45 raspberrypi systemd[1]: Starting MariaDB 10.1.37 database server...
Nov 27 14:31:46 raspberrypi mysqld[779]: 2018-11-27 14:31:46 3069988128 [Note] /usr/sbin/mysqld (mysqld 10.1.37-MariaDB-0+deb9u1) starting as process 779 ...
Nov 27 14:31:46 raspberrypi mysqld[779]: 2018-11-27 14:31:46 3069988128 [Warning] Can't create test file /media/usb1/mysq/raspberrypi.lower-test
Nov 27 14:31:46 raspberrypi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Nov 27 14:31:46 raspberrypi systemd[1]: Failed to start MariaDB 10.1.37 database server.
Nov 27 14:31:47 raspberrypi systemd[1]: mariadb.service: Unit entered failed state.
Nov 27 14:31:47 raspberrypi systemd[1]: mariadb.service: Failed with result 'exit-code'.
journalctl -xe
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A new session with the ID c2 has been created for the user pi.
--
-- The leading process of the session is 582.
Nov 27 14:31:23 raspberrypi systemd[1]: Started Session c2 of user pi.
-- Subject: Unit session-c2.scope has finished start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit session-c2.scope has finished starting up.
--
-- The start-up result is done.
Nov 27 14:31:23 raspberrypi sudo[594]: pi : TTY=unknown ; PWD=/home/pi ; USER=root ; COMMAND=/bin/su -
Nov 27 14:31:23 raspberrypi sudo[594]: pam_unix(sudo:session): session opened for user root by (uid=0)
Nov 27 14:31:23 raspberrypi su[598]: Successful su for root by root
Nov 27 14:31:23 raspberrypi su[598]: + ??? root:root
Nov 27 14:31:23 raspberrypi su[598]: pam_unix(su:session): session opened for user root by (uid=0)
Nov 27 14:31:23 raspberrypi su[598]: pam_systemd(su:session): Cannot create session: Already running in a session
Nov 27 14:31:31 raspberrypi sshd[631]: Accepted password for pi from 192.168.178.52 port 51136 ssh2
Nov 27 14:31:31 raspberrypi sshd[631]: pam_unix(sshd:session): session opened for user pi by (uid=0)
Nov 27 14:31:31 raspberrypi systemd-logind[259]: New session c3 of user pi.
-- Subject: A new session c3 has been created for user pi
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A new session with the ID c3 has been created for the user pi.
--
-- The leading process of the session is 631.
Nov 27 14:31:31 raspberrypi systemd[1]: Started Session c3 of user pi.
-- Subject: Unit session-c3.scope has finished start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit session-c3.scope has finished starting up.
--
-- The start-up result is done.
Nov 27 14:31:43 raspberrypi sudo[665]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/usr/sbin/service mysql start
Nov 27 14:31:43 raspberrypi sudo[665]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
Nov 27 14:31:45 raspberrypi systemd[1]: Starting MariaDB 10.1.37 database server...
-- Subject: Unit mariadb.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mariadb.service has begun starting up.
Nov 27 14:31:46 raspberrypi mysqld[779]: 2018-11-27 14:31:46 3069988128 [Note] /usr/sbin/mysqld (mysqld 10.1.37-MariaDB-0+deb9u1) starting as process 779 ...
Nov 27 14:31:46 raspberrypi mysqld[779]: 2018-11-27 14:31:46 3069988128 [Warning] Can't create test file /media/usb1/mysql/raspberrypi.lower-test
Nov 27 14:31:46 raspberrypi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Nov 27 14:31:46 raspberrypi systemd[1]: Failed to start MariaDB 10.1.37 database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mariadb.service has failed.
--
-- The result is failed.
Nov 27 14:31:47 raspberrypi systemd[1]: mariadb.service: Unit entered failed state.
Nov 27 14:31:47 raspberrypi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Nov 27 14:31:47 raspberrypi sudo[665]: pam_unix(sudo:session): session closed for user root
Da lo stesso errore anche se la directory di destinazione si trova sulla sd.
Il db si avvia corretamnete soltanto con il path datadir di default.