Glad to hear that things are progressing with your project.
I’d suggest skipping the OptoDataLink middle-ware and go direct from Node-RED to your database.
Just do a forums search for the database you intend to use.
Here is an example thread - It gets into MS-SQL more than MySQL, but is a great example of how you can format the data in Node-RED and send it direct to the db.
As usual, take a look and feel free to ask any follow up questions.