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

Use this board to ask questions or have discussions with other Profound.js users.
Eugene
New User
Posts: 1
Joined: Sat Aug 07, 2021 2:16 pm
First Name: Eugene
Last Name: Sampson
Company Name: Anawi
Contact:

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

Post 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
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

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

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests