Both of the following commands use sudo (root) access to install Node-RED globally (and nodejs if required). You may want to inspect them first to satisfy yourself as ...
Non-blocking MariaDB and MySQL client for Node.js. MariaDB and MySQL client, 100% JavaScript, with TypeScript definition, with the Promise API, distributed under the LGPL license version 2.1 or later ...