“Error: Knex: run\n$ npm install mysql --save\nCannot find module ‘mysql’\nRequire stack:\n- /home/myfolder/nodevenv/domains/my-domain/public_html/app/18/lib/node_modules/knex/lib/dialects/mysql/index.js\n- /home/myfolder/nodevenv/domains/my-domain/public_html/app/18/lib/node_modules/knex/lib/dialects/index.js\n- /home/myfolder/nodevenv/domains/my-domain/public_html/app/18/lib/node_modules/knex/lib/knex-builder/internal/config-resolver.js\n- /home/myfolder/nodevenv/domains/my-domain/public_html/app/18/lib/node_modules/knex/lib/knex-builder/Knex.js\n- /home/myfolder/nodevenv/domains/my-domain/public_html/app/18/lib/node_modules/knex/lib/index.js\n- /home/myfolder/nodevenv/domains/my-domain/public_html/app/18/lib/node_modules/knex/knex.js\n- /home/myfolder/domains/my-domain/public_html/app/lib/core/db.js\n- /home/myfolder/domains/my-domain/public_html/app/lib/core/app.js\n- /home/myfolder/domains/my-domain/public_html/app/lib/core/middleware.js\n- /home/myfolder/domains/my-domain/public_html/app/lib/setup/routes.js\n- /home/myfolder/domains/my-domain/public_html/app/lib/server.js\n- /home/myfolder/domains/my-domain/public_html/app/index.js\n- /usr/local/lsws/fcgi-bin/lsnode.js\n at Client_MySQL.initializeDriver (/home/myfolder/nodevenv/domains/my-domain/public_html/app/18/lib/node_modules/knex/lib/client.js:202:13)\n at new Client (/home/myfolder/nodevenv/domains/my-domain/public_html/app/18/lib/node_modules/knex/lib/client.js:83:12)\n at new Client_MySQL (/home/myfolder/nodevenv/domains/my-domain/public_html/app/18/lib/node_modules/knex/lib/dialects/mysql/index.js:21:1)\n at knex (/home/myfolder/nodevenv/domains/my-domain/public_html/app/18/lib/node_modules/knex/lib/knex-builder/Knex.js:16:28)\n at App.setDbConnection (/home/myfolder/domains/my-domain/public_html/app/lib/core/app.js:406:27)\n at App.getDbConnection (/home/myfolder/domains/my-domain/public_html/app/lib/core/app.js:425:25)\n at App.select (/home/myfolder/domains/my-domain/public_html/app/lib/modules/dbconnector.js:15:25)\n at App._exec (/home/myfolder/domains/my-domain/public_html/app/lib/core/app.js:610:57)\n at App.exec (/home/myfolder/domains/my-domain/public_html/app/lib/core/app.js:546:20)\n at App.define (/home/myfolder/domains/my-domain/public_html/app/lib/core/app.js:528:20)”
status
:
“500”
I updated my local server to these versions.
Mysql 8.0.31
MartiaDB 10.10.02
But my online server only runs with MariaDB 10.6. and can only be expanded to a managed server with the update.
Which I don’t want to do because it would cost more.
I am so expert on that field but it does appear so.
I experienced exactly the same error two days ago on a new site on my vps (centos8 + cPanel) and that was the issue.
After the npm install I got a new error about sharp not being installed so I ran
Npm install sharp --save
in the Wappler terminal and that fixed things.
I assumed the absence of the sharp installer had resulted in a failure to install mysql support onto the server.
{status: "500", code: "ER_NOT_SUPPORTED_AUTH_MODE",…}
code
:
"ER_NOT_SUPPORTED_AUTH_MODE"
message
:
"ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client"
stack
:
"Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client\n at Handshake.Sequence._packetToError (C:\\server\\www\\nodetest\\node_modules\\mysql\\lib\\protocol\\sequences\\Sequence.js:47:14)\n at Handshake.ErrorPacket (C:\\server\\www\\nodetest\\node_modules\\mysql\\lib\\protocol\\sequences\\Handshake.js:123:18)\n at Protocol._parsePacket (C:\\server\\www\\nodetest\\node_modules\\mysql\\lib\\protocol\\Protocol.js:291:23)\n at Parser._parsePacket (C:\\server\\www\\nodetest\\node_modules\\mysql\\lib\\protocol\\Parser.js:433:10)\n at Parser.write (C:\\server\\www\\nodetest\\node_modules\\mysql\\lib\\protocol\\Parser.js:43:10)\n at Protocol.write (C:\\server\\www\\nodetest\\node_modules\\mysql\\lib\\protocol\\Protocol.js:38:16)\n at Socket.<anonymous> (C:\\server\\www\\nodetest\\node_modules\\mysql\\lib\\Connection.js:88:28)\n at Socket.<anonymous> (C:\\server\\www\\nodetest\\node_modules\\mysql\\lib\\Connection.js:526:10)\n at Socket.emit (node:events:390:28)\n at addChunk (node:internal/streams/readable:315:12)\n --------------------\n at Protocol._enqueue (C:\\server\\www\\nodetest\\node_modules\\mysql\\lib\\protocol\\Protocol.js:144:48)\n at Protocol.handshake (C:\\server\\www\\nodetest\\node_modules\\mysql\\lib\\protocol\\Protocol.js:51:23)\n at Connection.connect (C:\\server\\www\\nodetest\\node_modules\\mysql\\lib\\Connection.js:116:18)\n at C:\\server\\www\\nodetest\\node_modules\\knex\\lib\\dialects\\mysql\\index.js:66:18\n at new Promise (<anonymous>)\n at Client_MySQL.acquireRawConnection (C:\\server\\www\\nodetest\\node_modules\\knex\\lib\\dialects\\mysql\\index.js:61:12)\n at create (C:\\server\\www\\nodetest\\node_modules\\knex\\lib\\client.js:262:39)"
status
:
"500"
When I created my project as a PHP page, the MySQL connection also worked.
Since I got the idea to create it as a Nodejs page because the routing works automatically and it also has many other advantages, I did that.
But now I can’t get any further
Make sure you choose the specific MySQL 8 client in the connection properties of the database connection in server connect and not just regular MySQL / mariadb
database connections in server connect can be different per target. Did you choose MySQL 8 for local but the regular mysql for remote? You can have different settings by switching the active target
I’m now trying to specify the direct IP “as mentioned here”.
Now I get this error message:
{status: “500”, code: “ER_ACCESS_DENIED_ERROR”,…}
code
:
“ER_ACCESS_DENIED_ERROR”
message
:
“ER_ACCESS_DENIED_ERROR: Access denied for user ‘myfolder_relaunch’@‘myHost’ (using password: YES)”
stack
:
“Error: ER_ACCESS_DENIED_ERROR: Access denied for user ‘myfolder_relaunch’@‘myHost’ (using password: YES)\n at Sequence._packetToError (/home/myfolder/nodevenv/domains/mydomain.de/public_html/app/18/lib/node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14)\n at Handshake.ErrorPacket (/home/myfolder/nodevenv/domains/mydomain.de/public_html/app/18/lib/node_modules/mysql/lib/protocol/sequences/Handshake.js:123:18)\n at Protocol._parsePacket (/home/myfolder/nodevenv/domains/mydomain.de/public_html/app/18/lib/node_modules/mysql/lib/protocol/Protocol.js:291:23)\n at Parser._parsePacket (/home/myfolder/nodevenv/domains/mydomain.de/public_html/app/18/lib/node_modules/mysql/lib/protocol/Parser.js:433:10)\n at Parser.write (/home/myfolder/nodevenv/domains/mydomain.de/public_html/app/18/lib/node_modules/mysql/lib/protocol/Parser.js:43:10)\n at Protocol.write (/home/myfolder/nodevenv/domains/mydomain.de/public_html/app/18/lib/node_modules/mysql/lib/protocol/Protocol.js:38:16)\n at Socket. (/home/myfolder/nodevenv/domains/mydomain.de/public_html/app/18/lib/node_modules/mysql/lib/Connection.js:88:28)\n at Socket. (/home/myfolder/nodevenv/domains/mydomain.de/public_html/app/18/lib/node_modules/mysql/lib/Connection.js:526:10)\n at Socket.emit (node:events:513:28)\n at addChunk (node:internal/streams/readable:324:12)\n --------------------\n at Protocol._enqueue (/home/myfolder/nodevenv/domains/mydomain.de/public_html/app/18/lib/node_modules/mysql/lib/protocol/Protocol.js:144:48)\n at Protocol.handshake (/home/myfolder/nodevenv/domains/mydomain.de/public_html/app/18/lib/node_modules/mysql/lib/protocol/Protocol.js:51:23)\n at Connection.connect (/home/myfolder/nodevenv/domains/mydomain.de/public_html/app/18/lib/node_modules/mysql/lib/Connection.js:116:18)\n at /home/myfolder/nodevenv/domains/mydomain.de/public_html/app/18/lib/node_modules/knex/lib/dialects/mysql/index.js:66:18\n at new Promise ()\n at Client_MySQL.acquireRawConnection (/home/myfolder/nodevenv/domains/mydomain.de/public_html/app/18/lib/node_modules/knex/lib/dialects/mysql/index.js:61:12)\n at create (/home/myfolder/nodevenv/domains/mydomain.de/public_html/app/18/lib/node_modules/knex/lib/client.js:262:39)”
status
:
“500”