emonPi MySQL for additional data

To run my project (node-red) decently I have reached a conclusion where I’d like to use MySQL instead of arrays in code (longer story).
I’d like to use MySQL that is already in emonPi but
I cant add my own databases/tables etc as MySQL root access is disabled and emoncms does not have sufficient privileges (understandably).
So, 2 questions:

  1. how can I create additional users with privilege levels that enable creation of new DB’s. Basically how can I access root level?
  2. what else should I be cautious about (data amounts of course, write as little and as rare as possible of course)?

What version of emonSD are you running? Or more to the point what mysql server? Is it mariadb?

IIRC root access to mariadb is managed by the OS, so root access is available to any user with sudo privileges. Just use sudo mysql rather than the mysql command, no password req’d.

Thanks, will try it out. I guess I have the latest as the whole setup is about a month old :slight_smile: .
EMONCMS version is low-write 10.1.4 with
Version: 5.5.5-10.1.23-MariaDB-9+deb9u1

Got everything working but one thing I’m not sure about.
Does the emonPi backup process back up also all SQL databases or only the “original” ones?
I guess it will not backup the Node-Red installation and Flows or will it?

Simply put - do I need to include them as well by myself or are they covered?

The EmonPi backup will backup everything required to restore from a fresh image.

Your node-red install will need to be backed up separately and that is more complex.