When I try to load up my emonpi local webpage this is what 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)
I know I probably need to reinstall the image file on the SD card. But I would like to keep all my current data. Is there a way that I can keep all my configuration and usage data? Maybe copy the info directly over?
It looks like the mysqld database isn’t running. Please run
sudo systemctl status mysql.service
and post the result here.
[email protected](ro):~$ sudo systemctl status mysql.service
● mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql)
Active: failed (Result: exit-code) since Tue 2017-10-03 08:17:09 UTC; 34min ago
Process: 914 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)
Oct 03 08:17:08 emonpi systemd: Starting LSB: Start and stop the mysql database server daemon…
Oct 03 08:17:09 emonpi mysql: /etc/init.d/mysql: ERROR: The partition with /home/pi/data/mysql is too full! … failed!
Oct 03 08:17:09 emonpi systemd: mysql.service: control process exited, code=exited status=1
Oct 03 08:17:09 emonpi systemd: Failed to start LSB: Start and stop the mysql database server daemon.
Oct 03 08:17:09 emonpi systemd: Unit mysql.service entered failed state.
I undrestand that the disk is full - how I can delete some information
That’s odd that your data partition should be full. You might want to expand it if your SD card is big enough. There is a script which will do this, but I never used it so I can’t vouch for it (I expanded my partition manually). It might be simpler to try to free up some space. Start by running these commands:
df -hlx tmpfs # Show local filesystems except tmpfs in human-readable format
sudo du -shc /home/pi/data/* # Show top level directory sizes.
I think it would be useful for the community if you could post the results here so that we can find out where all the space has gone.
I actually ended up reinstalling the software and restoring from a backup. And then I used the script to increase the data space. Everything has worked great since.