Unable to connect to DB

Hi,

I’m trying to connect my project to my database, but i can’t get it to work.

I’ve succesfully connected to the server (i have access to the files on the server via Wappler), but i’m not able to complete the database connection. Whatever I type in, I get the same error message:

error using this database connection!
server response : [my servername] | Login var tokens = { LOST_PASSWORD: “no” === “yes”, TIME: { current: 1600113384 * 1000, offset: 86400 * 1000, }, AUTH_METHOD: “CMD_LOGIN”, QUESTION: |QUESTION_JSON|", LOGIN_LANGUAGES: “default=en;en=English;nl=Nederlands;”,GEO_IP_LANG: “|GEO_IP_LANG|”, trial: “|IS_TRIAL_LICENSE|”, };

Do you have any tips on how to fix this?

Cheers

Welcome to Wappler!

Where do you get this error? Can you provide some screenshots? There is stuff in that error message that have nothing to do with your database.

Also, which platform are you using? PHP? Node.js? MySQL?

1 Like

Hi Brad,

Thanks for quick response:

I’m using a php myadmin My SQL database.

notification:
notification

The connection to the server is succesfull:

Cheers,
Olaf

Could anyone support on this issue?

I’ve watch a bunch of tutorial video’s on youtube:
e.g. Making a database connection in Wappler and webinar 1 (server connect) and webinar 2 (database connect), but without any succes.

Kind regards,
Olaf

When making a direct connection with the DB, it does work, but i cant seem to use that connection in the action steps.

Hey @TeamManager
You should “connect” to your database using the two options like you see in my following pic.
Once it’s done, save everything, and refresh your server actions panel, you should be able to select the connection after that. :slight_smile:
wappler-db

wappler-db2

1 Like

This error may be caused by your internet provider when using Direct Connect instead of the regular Server Connect. I am on Ziggo and am unable to use Direct Connect because of restrictions by Ziggo.
Try using regular Server Connect to see if the Dbase connection can be established that way.

Hi @ChristopheA,

Thanks for your response. The problem is that I can configure succesfully via Direct Database Connection, but not via Server Connect Connection (using the same information).


succesfull direct db connect


unsuccesfull server connect

I guess that means that something is incorrect in my target configuration, however, my target configuration seems to be succesfull.

Thanks for your response, for me it is the other way around. i’m able to do the direct connect, but not to do the regular server connect. (see screenshots in my other replies in this topic)

@TeamManager Does it work if you change “localhost” by your server IP address in the “Database Connection” screen?

It is for the last screenshot, but not the firtst two. :slight_smile:

Ensure you ftp connection points to your web root, not your ftp root I.e. if your files need to go into a folder like public_html, hotdocs, www etc make sure your ftp connects to that folder by adding it in the folder section of the ftp connection. If you dont the connection will fail as files will be uploaded to the wrong place.

2 Likes

Yess, that was it!

Thanks everybody!

2 Likes

Still, there seems to be an issue with the DB connection. It says that is is okay:

When performing a query, I’m able to see the tables and fields as included in the DB:

But when following the exact steps from the tutorial " Your first database connection. Presenting a database query in a bootstrap table", i don’t see any results / fields from the query in my table:

Even though in de DB connect I can see that there should be data in it:

Do you have any idea what the issue is?

Hopefully this is the last step before i’m able to build my app :slight_smile:

So you just aren’t seeing your data in your design view? That’s a known issue that will be fixed in tomorrow’s update.

You can turn off App Connect for now (blue lightning bolt) and you will still be able to work on your page. Just the live data won’t show.

If you actually preview in a browser you will see the data if you have a server set up.

Hi Brad,

The preview in browser also does not show any data.

Also not if I use the query preview in browser (then i get an error that it is not available):

I tried going to your page in a browser. There is an error.

Screen Shot 2020-09-16 at 1.45.28 PM

Try publishing your entire site using the publish button.

1 Like

solved :slight_smile: thanks a lot!

1 Like

Awesome! Good luck with your project! :beers:

What will have happened is that when your ftp connection was pointing to the wrong place your app connect scripts will have also been loaded into the wrong place. Nice all is working, check your server and you may find files uploaded above your web root which can be deleted now.