MariaDB, MySQL and MQTT error

I am running a Lighttpd / MariaDB / PHP5 setup (just testing a DietPi VM) and when trying to start the MQTT input I get an error;

2017-12-02 21:43:44.853|ERROR|phpmqtt_input.php|Cannot connect to MYSQL database:No such file or directory

Is it looking for a specific MySQL path?

ASAIK a specific path isn’t used directly.

The settings are

and the mysql setup (MySQL or Mariadb) will define the location of the actual files the mysql server serves, the default for both MySQL and Mariadb is /var/lib/mysql, so does /var/lib/mysql/emoncms exist? (use sudo when searching for it).

the “nature” of the error message would (to me) suggest that file cannot be found, I would expect different messages if the username or password were incorrect, likewise if the server address or port were incorrect, but I could be wrong (would that expectation be too logical?). So is the file name and permissions correct? Are you able to log in to emoncms? That should theoretically use all the same settings, if one works so should the other.
see emoncms/phpmqtt_input.php at master · emoncms/emoncms · GitHub
and emoncms/index.php at master · emoncms/emoncms · GitHub they are the same command

The “Cannot connect to MYSQL database:” is the logging prefix added by emoncms and the “No such file or directory” appears to be the error returned by mysql.

1 Like

HI Paul,

Thanks. I reinstalled from scratch and no issues. I must have missed a step out somewhere.

DietPi now has a Stretch VM so I now have that up and running quite nicely.