Database Server connection error

I have made a few database connections and have received a confirmation that they have worked. In the below snapshot you can see the notification that the test of the connection is OK and in the very background you can even see data being displayed by the databse.

However** I have followed a tutorial step by step on creating a user login form and when I attempt to login I get nothing. I get the following error on chrome:

  1. code: 0, file: “/home/ffrfas43tq/public_html/dmxConnectLib/modules/auth.php”, line: 44,…}

  2. code: 0

  3. file: “/home/ffrfas43tq/public_html/dmxConnectLib/modules/auth.php”

  4. line: 44

  5. message: “Call to a member function login() on null”

  6. trace: “#0 /home/ffrfas43tq/public_html/dmxConnectLib/lib/App.php(174): modules\auth->login(Object(stdClass), ‘identity’)↵#1 /home/ffrfas43tq/public_html/dmxConnectLib/lib/App.php(138): lib\App->execSteps(Object(stdClass))↵#2 /home/ffrfas43tq/public_html/dmxConnectLib/lib/App.php(108): lib\App->execSteps(Array)↵#3 /home/ffrfas43tq/public_html/dmxConnectLib/lib/App.php(73): lib\App->exec(Object(stdClass))↵#4 /home/ffrfas43tq/public_html/dmxConnect/api/Security/Login.php(8): lib\App->define(Object(stdClass))↵#5 {main}”

This lead me to inspect things which lead me to the datebase manager tells me that my connections are all faulty and are unable to connect. I hadn’t noticed this until now as each time I made a connection on the server connect the test connection came back as OK and data populated when tested.

Looking for some assistance.

Thanks,

Hi Forrest,

Welcome to Wappler!

Seems you have old version of the server connect files on your server.

Just make sure you are on the latest Wappler, save a server connect action and all the new files will be copied.

You can “publish” the site on your live target so that all the new files in dmxConnectLib folder are uploaded.

Hi George,

How do I ensure the files update when I update wappler?

Thanks,

Delete the dmxConnectLib folder locally. Save any server action and the folder will be recreated. Then just upload it to your server.

Thanks for the responses.

I tried the following actions:

  1. Removed all server connections
  2. Delete local & server file named “dmxConnectLib”
  3. Create new server connection and action

I am still getting this error though.

Thanks,

If you have just one database then you need just one connection to it.

Make sure you have entered the correct settings for the direct connection and also for the server connect connection and tested them.

Then just hit the refresh button on the top.

If you still get errors, expand the properties panel below to see the exact error.

See also:

Hi George,

I did follow that tutorial to setup.

I even tried creating a fresh project from scratch and setting up 1 databse connection and I get the same error right away however I do not have any error codes within the properties panel. Everything everywhere says it is working properly except for the error code below the connection as shown in initial screenshot.

Thanks,

Thanks,

You mean you are getting the same auth login error?

I haven’t gotten to that part - As soon as I create any database connection it logs as working but then shows up in connections as an error.

I recreated the connection with the login and still the same issue.

Thanks,

With the same issue, do you mean the initial login error or the database connection error?

Correct.

I am trying to:

Make a database connection for a login page

My issues are:

  1. Within database manager databsae connections are showing up as “unable to connect”
  2. The login page I have created when tested does not work. I get an error code on google chome.

I have tried:

  1. Tested database connection and got OK from wappler system
  2. Deleted all file on local and machine and recreated a databse action.
  3. Freshly installed wappler on new computer and completed recreated database connection & login page

Error log from chrom:

Failed to load resource: the server responded with a status of 401 (Unauthorized)

Everything I have tried, the same error persists.

I am following the Login page guide & the database connection guide.

Thanks,

Lets start with the database connection. Did you setup a Direct Database Connection and an Server Connect Connection? The Direct Connection is used within Wappler while the Server Connect Connection is used on the server from the server actions.

The unable to connect error in Wappler is normally when the direct database connection is incorrect.

I am not sure I follow entirely.

I created a connection within Targets to my server & I created a database connection via the server actions, action step “database connection” both responded with an “OK” and when tested even now respond with an “OK”.

Does that answer your question?

Thanks,

If you have setup your database connection from within server connnect, then you should uncheck the Use Direct Connection in the database manager, that should probably fix the the unable to connect error there.

Hi Patrick,

It’s been unchecked this whole time.

The error I am getting is “ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client.”

I am currently running the following database setup:

  • Server: Localhost via UNIX socket
  • Server type: MySQL
  • Server connection: SSL is not being used
  • Server version: 5.7.31 - MySQL Community Server (GPL)
  • Protocol version: 10
  • Server charset: cp1252 West European (latin1)

Thanks,

Are you sure it is MySQL 5.7 that is running on the server, the error is normally something you get with MySQL 8.0.

Yep - the details I shared with you was directly from MyPHPAdmin and I went and verified on the backend with WHM and it is 5.7.

Thanks,

Thoughts?