Hi!
My HDD finally died, so I’ve got a new one and decided to do the full clean install.
After installation is done I’ve installed RPi monitor and Nextcloud via dietpi-software. At this point, Nextcloud works fine.
Then I’m moving user data to HDD via DietPi Drive Manager and now mysql service (MariaDB in this case) won’t start. Something got broken. How do I fix it?
root@dietpi:~# service mysql start
Job for mysql.service failed because the control process exited with error code.
See “systemctl status mysql.service” and “journalctl -xe” for details.
root@dietpi:~# systemctl status mysql.service
● mysql.service - LSB: Start and stop the mysql database server daemo
n
Loaded: loaded (/etc/init.d/mysql; generated; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2018-06-12 20:17:04 M
SK; 39s ago
Docs: man:systemd-sysv-generator(8)
Process: 9632 ExecStart=/etc/init.d/mysql start (code=exited, status=1
/FAILURE)Jun 12 20:17:04 dietpi /etc/init.d/mysql[10262]: 0 processes alive and ‘/usr/bi
n/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping’ resulted in
Jun 12 20:17:04 dietpi /etc/init.d/mysql[10262]: [61B blob data]
Jun 12 20:17:04 dietpi /etc/init.d/mysql[10262]: error: ‘Can’t connect to local
MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2 “No such file or d
irectory”)’
Jun 12 20:17:04 dietpi /etc/init.d/mysql[10262]: Check that mysqld is running a
nd that the socket: ‘/var/run/mysqld/mysqld.sock’ exists!
Jun 12 20:17:04 dietpi /etc/init.d/mysql[10262]:
Jun 12 20:17:04 dietpi mysql[9632]: Starting MariaDB database server: mysqld .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . failed!
Jun 12 20:17:04 dietpi systemd[1]: mysql.service: Control process exite
d, code=exited status=1
Jun 12 20:17:04 dietpi systemd[1]: Failed to start LSB: Start and stop
the mysql database server daemon.
Jun 12 20:17:04 dietpi systemd[1]: mysql.service: Unit entered failed s
tate.e–
Jun 12 20:17:04 dietpi systemd[1]: mysql.service: Failed with result ‘e
xit-code’.
and
Jun 12 20:06:00 dietpi mysqld_safe[1243]: Starting mysqld daemon with d
atabases from /var/lib/mysql
Jun 12 20:06:00 dietpi mysqld[1248]: 2018-06-12 20:06:00 1996001280 [No
te] /usr/sbin/mysqld (mysqld 10.1.23-MariaDB-9+deb9u1) starting as process 1247
…
Jun 12 20:06:01 dietpi mysqld[1248]: 2018-06-12 20:06:01 1996001280 [No
te] InnoDB: Using mutexes to ref count buffer pool pages
Jun 12 20:06:01 dietpi mysqld[1248]: 2018-06-12 20:06:01 1996001280 [No
te] InnoDB: The InnoDB memory heap is disabled
Jun 12 20:06:01 dietpi mysqld[1248]: 2018-06-12 20:06:01 1996001280 [No
te] InnoDB: Mutexes and rw_locks use GCC atomic builtins
Jun 12 20:06:01 dietpi mysqld[1248]: 2018-06-12 20:06:01 1996001280 [No
te] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
Jun 12 20:06:01 dietpi mysqld[1248]: 2018-06-12 20:06:01 1996001280 [No
te] InnoDB: Compressed tables use zlib 1.2.8
Jun 12 20:06:01 dietpi mysqld[1248]: 2018-06-12 20:06:01 1996001280 [No
te] InnoDB: Using Linux native AIO
Jun 12 20:06:01 dietpi mysqld[1248]: 2018-06-12 20:06:01 1996001280 [No
te] InnoDB: Using generic crc32 instructions
Jun 12 20:06:01 dietpi mysqld[1248]: 2018-06-12 20:06:01 1996001280 [No
te] InnoDB: Initializing buffer pool, size = 128.0M
Jun 12 20:06:01 dietpi mysqld[1248]: 2018-06-12 20:06:01 1996001280 [No
te] InnoDB: Completed initialization of buffer pool
Jun 12 20:06:01 dietpi mysqld[1248]: 2018-06-12 20:06:01 1996001280 [No
te] InnoDB: Highest supported file format is Barracuda.
Jun 12 20:06:01 dietpi mysqld[1248]: 2018-06-12 20:06:01 1996001280 [No
te] InnoDB: 128 rollback segment(s) are active.
Jun 12 20:06:01 dietpi mysqld[1248]: 2018-06-12 20:06:01 1996001280 [No
te] InnoDB: Waiting for purge to start
Jun 12 20:06:01 dietpi mysqld[1248]: 2018-06-12 20:06:01 1996001280 [No
te] InnoDB: Percona XtraDB (> http://www.percona.com> ) 5.6.35-80.0 started; log se
quence number 3163481
Jun 12 20:06:01 dietpi mysqld[1248]: 2018-06-12 20:06:01 1447031616 [No
te] InnoDB: Dumping buffer pool(s) not yet started
Jun 12 20:06:01 dietpi mysqld[1248]: 2018-06-12 20:06:01 1996001280 [No
te] Plugin ‘FEEDBACK’ is disabled.
Jun 12 20:06:02 dietpi mysqld[1248]: 2018-06-12 20:06:02 1996001280 [No
te] Server socket created on IP: ‘127.0.0.1’.
Jun 12 20:06:02 dietpi mysqld[1248]: 2018-06-12 20:06:02 1996001280 [No
te] /usr/sbin/mysqld: ready for connections.
Jun 12 20:06:02 dietpi mysqld[1248]: Version: '10.1.23-MariaDB-9+deb9u1
’ socket: ‘/var/run/mysqld/mysqld.sock’ port: 3306 Raspbian 9.0
Jun 12 20:06:02 dietpi mysql[1059]: Starting MariaDB database server: mysqld …
Jun 12 20:06:02 dietpi systemd[1]: Started LSB: Start and stop the mysql databa
se server daemon.
– Subject: Unit mysql.service has finished start-up
– Defined-By: systemd
– Support: > Debian -- User Support– Unit mysql.service has finished starting up.
– The start-up result is done.
Jun 12 20:06:02 dietpi /etc/mysql/debian-start[1319]: Upgrading MySQL tables if
necessary.
Thanks!