[SOLVED] Failed to install EmonCMS on my Pi

Hi

 

I have installed emonCMS on my PI following this tutorial: http://emoncms.org/site/docs/fullstackpi except that I started from a normal raspbian image and that I mounted my NAS into /data (cifs mode).

 

When I access raspberry_IP/emoncms, I go 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)

 

So I stopped and restarted mysql without success: it fails to start.

The command: sudo mysqld  output is the following:

InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.

Here is the detail about this file:

-rwxr-xr-x 0 pi users 18874368 Feb  3 23:33 ibdata1

Any idea about the issue and how to solve it? cannot find a clue...

thanks

 

 

 

TrystanLea's picture

Re: [SOLVED] Failed to install EmonCMS on my Pi

On my system the ibdata1 has the following permissions:

-rw-rw---- 1 mysql mysql 27262976 Feb  4 00:02 ibdata1

you can change the folder ownership with

sudo chown mysql:mysql ibdata1

and permissions to -rw-rw---- with:

sudo chmod 660 ibdata1

darrepac's picture

Re: [SOLVED] Failed to install EmonCMS on my Pi

In fact, I can't cause it is a mounted NAS in cifs mode and it seems that chown has no effect on it

I can try to mount the NAS with mysql user may-be... will google around but strange that mysql could only open files that has mysql group...

darrepac's picture

Re: [SOLVED] Failed to install EmonCMS on my Pi

ok, I make it work by using file_mode=0777 and dir_mode=0777 in mounting options...so that anyone can read/write those files and also mysql...

I have the login page of emoncms...but nothing happen when I try to register one user........ (only a pink bar/box appear)

 

darrepac's picture

Re: [SOLVED] Failed to install EmonCMS on my Pi

Solved! (Issue on appache config file...)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.