Hi
I had a power cut this morning and after my emonpi rebooted it seems the mysql server doesn’t want to load, when browsing the the webserver you get the following error
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)
On issuing a “service mysql start” I get a Job for mysql.service failed. See systemctl status mysql.service and journalctl for details.
That command won’t work because the root partition needs to be the last partition on the card.
He needs to expand the 3rd partiton. raspi-config will give this error:
Here are the steps to manually resize your third partition:
Issue the command sudo fdisk /dev/mmcblk0
Hit p then Enter to display your partition table
Take note of the number in the Start column for /dev/mmcblk0p3
Hit d then Enter, you’ll be prompted for the partition number
Hit 3 then Enter
Hit p to verify the partition is gone
Hit n
Hit p You’ll be prompted for the partition number
Hit 3 then Enter
enter the Start number you made a note of earlier
If you want to use the rest of the space on the card, hit Enter, otherwise type +size{K,M,G} e.g. +8G
Hit p then Enter to verify the partition has been created
Hit w to write the partition table
Reboot
Log in and issue the command sudo resize2fs /dev/mmcblk0p3
Done
Just had the same problem as the original poster and fixed it with your instructions, many thanks. I might have got the resize2fs command wrong but I couldn’t get it to accept a size
First sector (2048-31291391, default 2048): 7288832 +1G Value out of range.
First sector (2048-31291391, default 2048): 7288832 +500M Value out of range.
First sector (2048-31291391, default 2048): 7288832
Last sector, +sectors or +size{K,M,G,T,P} (7288832-31291391, default 31291391):
Created a new partition 3 of type ‘Linux’ and of size 11.5 GiB.