Suddenly Cannot Connect to Database - Empty Response!

Am I going crazy?

This morning, my connection to my local database worked fine. I changed it to my remote one for an upload, which worked fine. Now I tried to change it back to the local one and I can’t access any databases any more…

  • The local database is running, I can access it with phpmyadmin and MySQL Workbench.

  • I haven’t changed any access information in the database.

  • I’ve restarted my laptop.

  • After about a minute I am getting the message
    “Error using this database Connection! Empty Response!”

  • I can’t access the remote database any more either.

What could be the problem?

I’ve rebooted again… phpmyadmin on my local database is still okay…
Now the remote database is working but the local one is giving this message:

error

I’ve also just found my Open in Browser button has stopped working… could this be related?

your database seems offline - check your local installation

Okay… I have just rebooted everything, run up wamp, gone into phpmyadmin and mysql workbench and accessed the database okay…

… and now I go into Wappler, using a db Connection that worked fine yesterday, and get the same error message…

… so here is the log file for this:

chrome_debug (2).zip (7.9 KB)

… and here is the workbench working…

db

Antony …

First you got tons of invalid app connect expressions … with all the hand coding that you do:

[19048:19052:0203/151734.707:INFO:CONSOLE(7)] "Error: Lexer Error: Unexpected token 'X' at column 27 in expression [show_label.items.contains(1XXX)||show_all_field_labels.value==1?'visible':'hidden']"
[19048:19052:0203/151734.708:INFO:CONSOLE(7)] "Error: Lexer Error: Unexpected token 'X' at column 50 in expression [show_label.items.contains(XXX0)?'':apptext.value.1XXX]" 
[19048:19052:0203/151735.005:INFO:CONSOLE(7)] "Error: Parse Error"
[19048:19052:0203/151735.006:INFO:CONSOLE(7)] "Error: Parse Error"
[19048:19052:0203/151735.023:INFO:CONSOLE(7)] "Error: Lexer Error: Unexpected token 'X' at column 27 in expression [show_label.items.contains(1XXX)||show_all_field_labels.value==1?'visible':'hidden']",
[19048:19052:0203/151735.023:INFO:CONSOLE(7)] "Error: Lexer Error: Unexpected token 'X' at column 50 in expression [show_label.items.contains(XXX0)?'':apptext.value.1XXX]"

Second your database is just refusing the login for root. Maybe you haven’t setup and choose the right database user to be used within Wappler.

Hey George… Thanks for looking at this!

Those are great little error messages… the XXX is from my snippet templates that I search and replace! You caught me in the middle of some of those…

I just don’t understand the databsae access issue… it was working fine earlier this morning… I’ve not changed anything in the database, and if I had, then MySQL workbench wouldn’t be logging in…

The mystery continues! :slight_smile:

Okay… yippee… I’ve fixed it. :champagne:

Wappler would not access my local database because my target was set to be remote.

Since the target doesn’t include database details then I was not expecting this to be an issue…

… but clearly it is!

That’s why i asked you about the target selected.

Not sure what do you mean by that?
Wappler uses the URLs set in your target options and uses them to establish the connection to the db.

But surely the connection to the database is taken from where you define it, in the Database Connection Action Step?

I currently have the Target as local and the database as remote and it all works okay…

server

@Antony
Usually database servers don’t allow remote connections. So what Wappler does is - it uploads the connection file to the selected target and calls the database connection from there.

So when your target is set to remote, and the db connection info is set to your local DB then what happens is - Wappler uploads the localconnection to yourremotehost.com and calls it from there.
The result is: yourremotehost.com/dmxConnect/modules/Connections/local.php and local.php points to some local db server :slight_smile:
That is wrong and you should not expect this to work or do it like that. That is why there are different targets…

That makes sense @Teodor… thanks for the explanation!