5. Setup Direct or Bridge.php Connection
Direct Connection to MySQL Server
To configure direct connection to your remote database, follow a few steps:
1. Open Settings -> Preferences -> Database Connection Tab (F12)
2. Enable Direct connection to remote database check-box
3. Leave unchecked the Use local (embedded) database checkbox.
4. Specify the following Remote Database Connection Settings:
Host (Server address) - Usually it is your website name like "mywebsite.com"
Port - 3306
User name (login)
Password
Database (name)
You can find these details at your store root /app/etc directory. Open env.php file for Magento 2 store.
If the settings details, specified in the form, are correctly you will be able to upload the list of all available databases which can be used with such configuration by pressing the following option:
5. Click 'OK' to save this entry.
NOTE: You need to add your IP to the access list so you could use the direct connection.
PHP MySQL Bridge Connection
To configure PHP MySQL bridge connection, follow the few steps:
1. Download the latest version of PHP MySQL Bridge. You can download it here.
2. Edit bridge.php file - change default user name (which is 1) and password (which is 1) to keep your store protected.
In order to do it you need to open bridge.php file using NotePad or other text editor and find the following rows there:
You need to put your own values instead of "1" in both lines.
Also you need to uncomment /tmp directory in bridge.php file, create tmp folder in your store root and set 777 permission.
3. Copy bridge to your online store root (catalog) directory. Bridge should be accessible as http://www.mywebsite.com/bridge.php . For example you have to see the following while browsing the bridge URL:
4. Open Store Manager -> Settings -> Preferences (F12) and enable PHP MySQL bridge connection check-box.
5. Specify the following PHP MySQL Bridge and Local Database Connection Settings
Bridge URL - Specify Bridge URL
Username and Password - Specify those you used to edit bridge.php file (see step 2)
Database Name - Specify local database name (type name manually)
6. Click "Apply" to save this entry.
7. Press "Test PHP Bridge Connection" once you finished to see if the bridge settings details are specified properly and can be applied.
In case the bridge configuration is going to use at the first time, you will see the next message:
8. Press [Get data from the Web] to start receiving recent details of your store database and connect to the store.