I have successfully set up two Targets. One “Development” and the other “Production”. I am using Docker MariaDB locally and hosting MariaDB remotely.
In the Development target everything works properly. I am able to view the DB contents in my pages both in Wappler Preview mode and on my local browser.
In the Production target I am UNABLE to view the database results on the same pages as I was able to view locally. The pages just appear without the DB content.
The username and password are identical on both the Production and Development side. I confirmed this by using NAVICAT to connect to both the Production and Development databases. I am able to successfully do queries on the Production server, just as I am able to do the Development server. Data was successfully transferred between the two databases.
In frustration, I changed the passwords in Wappler and updated them in Docker. Then, I change the password on the Production database to match that in Docker. I checked and confirmed the logon username and password for both databases with NAVICAT. I was confirmed that the username and password are correct.
I deleted the entire Production website and used TRANSMIT to copy all files (including hidden files) from Development to Production. I called a page and the table rows would not display.
Next, I checked the files containing the connection strings to make sure they were correct. I found a file that did not update the correct password. The file was:
When the server connect runs on the page, can you see what is returned in the Network tab of dev tools? Is there an error code? You could also enable debug mode to give you more info that would help narrow down the problem.
I will try that. Right now I have deleted the entire Production site and uploading fresh through Wappler. We’ll see how that goes. Then I can try your suggestion. Thanks for getting back to me.
As I suspected, the DB connection is not accessing the database. it fails the login and password I suspect. There must be another file involved the contains the wrong password. Can anyone help?
There are still some issues with targets and databases from what I see.
Here’s how I move between dev and production:
Create a single db connection.
With dev target, go to any server action where you have database commection step, open conmection properties, verify credentials are correct, hit save.
Then hit save on server action, hit yes on the linking prompt.
Again hit save on server action (just to be sure) to save server action.
Create a prod target, if not already preesent, and switch to it.
Open any server action with db connection, and go to connection properties again.
If you see prod db settings here, all good. Else, change settings, hit test connection, then hit save connection, then click save.
sid: Thank you for your steps. I did follow them and reached the same observation. Although I am using the correct connection it is unable to connect.
Now for the real kicker! And I feel embarrassed to say this, a couple of months ago when we configured the server we did encryption-at-rest on all the databases. Meaning, the databases are completely encrypted! No wonder I can’t get into them. Now I have to figure out how to make Wappler work under such conditions. Your steps helped me ring the bells upstairs. Thank you.