Page 1 of 1

Hello folks. I am struggling to connect to my MariaDb I would appreciate some assistance, please.

Posted: Sat Aug 07, 2021 3:28 pm
by Eugene
This is the config.js file contents

I have followed the instructions in the video https://www.youtube.com/watch?v=sCyAOBJwu9M

THIS IS THE ERROR MESSAGE I GET ON THE CONSOLE AND ON THE PROFOUNDJS IDE

Unable to retrieve default schema for database connection "MariaDB".
Error: Cannot find module 'mysql'
Require stack:
- C:\Users\Eugene Sampson\profoundjs\node_modules\profoundjs\utils\dbQuery.jse
- C:\Users\Eugene Sampson\profoundjs\node_modules\profoundjs\index.js
- C:\Users\Eugene Sampson\profoundjs\start.js


THIS IS THE CONTENTS OF MY CONFIG.JS FILE

module.exports = {
"port": 8081,
"staticFilesDirectory": "htdocs",
"pathlist": [
"pjssamples"
],
"initialModules": {
"/hello": "pjssamples/hello",
"/hello2": "pjssamples/hello2",
"/connect4": "pjssamples/connect4",
"/upload": "pjssamples/upload"
},
"databaseConnections": [
{
"name": "default",
"default": true,
"driver": "IBMi"
},
{
"name": "MariaDB",
"driver": "mysql",
"driverOptions":{
"host": "localhost:3306",
"user": "root",
"password": "mypassword",
"database": "volunteers"
}
}
],
"timeout": 3600,
"defaultMode

Re: Hello folks. I am struggling to connect to my MariaDb I would appreciate some assistance, please.

Posted: Sat Aug 07, 2021 9:04 pm
by Scott Klement
From the error message, you are missing the mysql module. To solve that, navigate to the directory where you installed profoundjs (typically, this would be called 'profoundjs', but you can choose other names) and type the following:

Code: Select all

npm install mysql