When I try to enter emoncms I get:
“Can’t connect to database, please verify credentials/configuration in settings.php
Error message: **Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)”
After running the comand “sudo systemctl status mysql.service -l”
I get:
● mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql)
Active: failed (Result: exit-code) since Thu 2017-12-07 18:07:11 WET; 27min ago
Process: 3877 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
Dec 07 18:07:11 emonpi mysql[3877]: df: ‘/home/pi/data/mysql/.’: No such file or directory
Dec 07 18:07:11 emonpi mysql[3877]: /etc/init.d/mysql: ERROR: The partition with /home/pi/data/mysql is too full! … failed!
Dec 07 18:07:11 emonpi /etc/init.d/mysql[3897]: ERROR: The partition with /home/pi/data/mysql is too full!
Dec 07 18:07:11 emonpi systemd[1]: mysql.service: control process exited, code=exited status=1
Dec 07 18:07:11 emonpi systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
Dec 07 18:07:11 emonpi systemd[1]: Unit mysql.service entered failed state.
And this is how much:
df -hlx tmpfs
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.4G 2.0G 1.2G 63% /
devtmpfs 481M 0 481M 0% /dev
/dev/mmcblk0p1 60M 22M 39M 37% /boot
/dev/mmcblk0p3 11G 39M 11G 1% /home/pi/data
The microSD is of 16GB and the image is brand new!
Just realised now, that I have to mount: sudo mount /dev/mmcblk0p3 /home/pi/data
and then start the mysql service again to solve the problem each time the raspberry pi reboots!
Crazy!