Tutorial - Connecting Remote MySQL/PostgreSQL using PHP Script

In this tutorial we will show you how to use the new connection method which can connect to any remote database using a PHP script provided by DB AppMaker.

Steps to Setup Remote Connection

1. Upload the connection script to your site

The connection script is named phpmaker.php and can be found under the installation folder, e.g. C:\Program Files (x86)\DB AppMaker 4. Upload the script to site first.

Important Always use the script shipped with your version of DB AppMaker. DB AppMaker may not work with script shipped with previous versions.

2. Test the script

If this is the first time to use this connection method, you may want to test the script and get to understand how it works. You don't need to test the script as described in this step next time. Instead, you can simply press the Test button in DB AppMaker to test the script after entering the URL.

  1. Browse to the script using your browser

  2. Enter the connection information and and select the encoding if necessary, click Get Database List, a combobox populated with the available databases should be shown. Select the database you want to connect, click View Schema

  3. If you can view the schema of database in XML like the follows, the script is working properly. DB AppMaker will talk to this script similarly and get the database schema over HTTP.

3. Open DB AppMaker

Open DB AppMaker, enter the connection information. Note that you are actually connecting to your database through the PHP script on the server, so in most cases the server is "localhost" unless the database server is not installed on the same server as the web server.

Click the dropdown button of the Database combobox, you should be able to see the available databases. Select your database, click the Connect button. The database info should be loaded and displayed in the left pane.

 

Using File URL

If for some reason you cannot get the database schema using HTTP, you can also save the schema in your browser (Step 3c. above) as a local .xml file and enter the file URL, e.g. "file://C:\phpmaker.xml", to connect.

 

 

 ©2016-2021 e.World Technology Ltd. All rights reserved.