Database manager and remote connections

In 2.9.0, Database Manager seemed to work straightaway - with local and remote connections. I’ve just installed 2.9.1 and I can no longer access remote connections. When I first tried, the ‘Query Database Schema’ message appeared and I had to force quit Wappler. The connections still work fine in Server Connect.

Having restarted Wappler, I can see the databases and tables, but they’re the local ones (when I have a remote target selected). Is there some setting I need to make now?

Do I need to click ‘Direct’ perhaps (I don’t know what it’s for)? I thought perhaps ‘Direct’ was something to do with SQLite. The release notes mentions that a SQLite database can be used directly in Wappler, on a website. I’m not sure what this means. Is it still accessed in the same as other databases as far as server connect is concerned? If it’s used on a local machine/network, is a server still needed to access the database?

I had the same issue when I first started up 2.9.1. Just save the connection again and it should work.

Select your connection go to ‘Server Connect Connection’ and Save the connection again.

Same here…

Yes “direct” might not be the best name.

We mean connect directly to remote databases.

So if you want to directly connect to any remote databases you should use direct, otherwise you will have just local connection.

Maybe we should call them just “remote connection”

You can still edit your server connect connections, we have also a button for that next to the direct checkbox.

So that makes it a bit more confusing… you have the direct connections that Wappler needs to connect straight to your database, but you also have your server connect database connections that run from your web server.

And under local development all connections are just local…

So any suggestions for better terminology are very welcome.

2 Likes

Addition to George’s reply - the direct connection is working the same way as your Navicat or MySQL Workbench does. It just connects directly, not through a web server.

Thanks Teodor, what is the advantage of one over the other? I tried with and without direct connection checked and didn’t notice any difference in performance or otherwise?

Direct connection can be made without setting up an ftp target to your server and creating a server action.
Same as you do with Navicat.

1 Like

Thanks Brad. I’m not having much luck with remote connections. Local ones are fine as were remote before 2.9.1. The trouble is, I make a change and then the ‘Query Database Schema’ indicator appears and I have to force quite Wappler.

My remote MySQL connections have always worked without any problem - and they still do. Remote connections using the Database Manager also worked until the latest update, 2.9.1. What is disconcerting is that when I switch target, to remote, the database remains local (ie the database as displaying in Database Manager).

As the remote connections no longer work, is there a particular procedure for getting them to work? Should I click ‘Use Direct Connection’ and then choose one or both of the other options and reset/save?
image

I’ve tried various options but each time this appears and I have to force quit Wappler:

image
So when I restart I don’t know if any changes have been made or not. I imagine not, as nothing seems to changes. I’m using Windows 10.

Actually we simplified the database view in the latest update - it always shows you the database from the currently selected target.

When you switch targets - the database scheme will reload according to the new target.
The schema does get cached and the switch can be really fast - so that is why you are thingking maybe that you are looking at the same local connection.

We just don’t display the target name any more in the database tree - but the whole database tree and connections are fully target dependent. So you will see them for you current target.

I assumed it should do this, but it doesn’t in my case. I usually create dummy tables called website-name_local and website-name_remote, so I can see at a glance which version I’m looking at. I can clearly see that the the database doesn’t update when I change target. The page in Design view reflects the correct target, but not Database Manager.

In case it’s a clue to the problem, the list of tables do look different: the local/remote lists are sorted differently.

1 Like

Fab idea! :slight_smile:

That is interesting… for me it is not fast, it is doing a complete “Query Database Schema” every single time which takes about 30 seconds, even though I have changed nothing.

I simply toggle “Target:” at the bottom of the Wappler screen and I have a 30 second wait.

This will be improved in the next update :slight_smile: so it won’t take any time to switch at all.

1 Like

Hey Guys, you can check the following articles which answers most of the questions in this topic:

Direct connection is one if those things you don’t need until you find you do. Confused?
Generally Wappler does not connect directly to your database, it connects to a script in your web server which then connects to your database. The result is that your database always sees wappler access as being from your server address.
The database table manager needs to interface with your database server directly and some database servers require different settings for a direct connection to those needed from the web server.
If my servers case, for increased security, each database can only be accessed remotely via a specific port and using different server credentials. Due to this I need to specify different details for web server access (I.e. localhost) and remote access direct from Wappler running on my pc in the office.

Thanks Hyperbytes!

It is most confusing to play around with and end up with the same error messages. Maybe someone will put together a line by line instruction for both the local and remote connections.

all kind of databases you want to use in it

We may include here the oracle database?

If it helps,this is one of my database servers set up as Server connect and Direct Database connections

image

Server Connect

Direct Connection

1 Like

Thank you so much!

For the Host address, port and other information as shown in your images, would I get this from the web host where the database resides? For instance, Bluehost?

For instance, your Direct Database Connection: Host has more details, i.e. mysql.stackcp.com. Mine only shows the Host as localhost, with no Port.

I assume that the User info, and Password info would be the same used as per the existing Server Action DB connection info.