A project that has been working long time on this server gives this error when loading:Load Database Failed
Failed to load response from server:
Devart Http Tunnel v1.69 Tunnel scripstis installed correctly
You can establish connection throufh the HTTP tunnel.What could be the problem here? (v2023)This is a shared budget server where I cannot configure anything.
Read Database Setup → URL Connection (for remote database) → Notes:
- You may need to create user in your database as ‘username’@‘%’, the wildcard as host implies that the user can connect from any client host.
- If the MySQL server is not installed on the web server (e.g. hosting providers may use separate MySQL servers), then the server is not “localhost”, you should enter the IP address of the MySQL server.
Thanks,I cannot change user on this database, so that is not an option.I guess something must have changed serverside, but it is difficult to contact the hosting support since they know nothing about PHPMaker, so I needed more details about the error.Of cource I have the option of setting up a local MySQL server but I have avoided that for many years.
- There is no need to change user, but if the user does not allow remote connection in the first place (e.g. user is defined as ‘username’@‘localhost’ only), you cannot connect remotely at all.
- Your hosting provider does not need to know anything about PHPMaker, it is irrelevant. You should only ask them to provide the MySQL’s IP address (which you should be able to find in their control panel) and make sure the user allow remote connection (i.e. ‘username’@‘%’). If they fail to do so, you might better find a better hosting provider.
- You should use a local MySQL database during devlopment. It will save you a lot of time.
Hosting provider does not allow remote user and unfortunately neither changing host nor using local MySql is an option.So I am stuck with using v.2020 to make any changes to the database and then copying changes to the project file in v.2023 with a text editor.Life was so much easier pre v.2021 when tunnel.php was introduced
arbei wrote:
- You should use a local MySQL database during devlopment. It will save you a lot of time.
This is the closest approach, I think.
I have taken the plunge, installed WAMP, exported the database from remote server and imported it in local MySql. All works as expected.Now trying to get the first project changed to development mode with local MySql.
But I cannot change the database connection details, they seem to be locked to remote settings, and both .\src\config.production.php and .\src\config.development.php have the same info.
If I generate and manually change config.development.php to local db it works as expected.
Also note, that even If i make a new project and try to access the local db with localhost and default user “root” I get a message “Access denied for user root@localhost (using password: yes)”. Note there is no password defined for user “root”.Questions:
- What are the correct steps to change the project to work with local db?2) When uploading to remote server, can I take the generated source from local web-folder and just opload that, and change this setting in .\src\config.php to ‘production’:
// Environment
“ENVIRONMENT” => “development”,tia
Well got most of the answers:
- In local MySql I had to create a user and grant priviliges to this user.
- I then could connect to local db and save that information
- For production I changed config files manually and uploaded from local webspace to remote webspace and that worked OK.
I still need to find the correct procedure to switch back and forth between development and production.
To me it looks like there should be dublicate setting pages in PHPMaker, so you could easily switch between them.At least I am getting somewhat less frustrated now
marisoft wrote:
I still need to find the correct procedure to switch back and forth between development and production.
To me it looks like there should be dublicate setting pages in PHPMaker, so you could easily switch between them.
You may use Database_Connecting server event.
Hey - that works perfect