I've just put a new Ready-To-Go SD card into a RPi and booted it up. MYSQL fails to start and I get a "cannot connect to database" error when I visit the emoncms web interface.
I can SSH into the pi and have tried to kick start MYSQL but it just fails. I can't find any relevant guides on the website and have found a dead page which looks like it should explain how to set things up but has no content!
Any help please?
Matt
Re: Ready-To-Go SD card MYSQL problem
I'm having the same issue. Just started the Jun 17 image. The webpage results in:
Looking at the /var/logs/syslog I see the following:
Any advice on getting the June 17 image up and running?
Re: Ready-To-Go SD card MYSQL problem
This seems to be a memory allocation issue: there is not enough RAM for the database to start. I have an original Raspberry Pi B, which has 512MB of RAM. By default, there are 6 ramdisks that are created, which on my system total 245MB. Also, the default GPU RAM allocation is 64MB, so that leaves about 203MB for processes.
The database is trying to allocate 128MB (as seen in the log), and there is just not enough ram for it to do it. The following are some solutions:
I chose #3, since this RPi won't be doing any heavy graphics. To reduce the GPU RAM, do the following:
Then anywhere in the file, add the following line:
That will give the processes an extra 48MB to use. This was enough for the database to load for me.
Admins, what are your recommendations on freeing up RAM? Maybe the author of the June 17 SD image has a RaspberryPi 2 B, which has 1024MB of RAM, so this is not an issue? How can we improve the SD card image for those with smaller amounts of RAM?