1.3. PHP MySQL Bridge Connection
This section describes how to set up a Bridge connection in Store Manager for Magento.
A Bridge is simply another method of connecting to your Magento database. Normally, the program uses a direct MySQL connection to the remote database on your website or web server. In some cases this type of connection will not work, i.e. your hosting provider may not allow direct connections, or your LAN settings/firewall may prevent a connection from being established. A Bridge Connection allows you to work with a remote database, without a direct MySQL connection being established.
While working using a Bridge connection, you must store your temporary data in a local database. Bridge.php is used for two operations - get data from the remote database and post data to that database. You must understand the difference between a Bridge connection and a direct MySQL connection. Bridge.php is not a connection itself. Its sole purpose is to facilitate transferring data between a remote and a local machine.
Configure PHP MySQL Bridge Connection
To configure a PHP MySQL bridge connection, follow a few steps:
1. Download the latest version of PHP MySQL Bridge here(recommended) or open your application main directory - usually, it is C:\Program Files (x86)\eMagicOne\Store Manager for Magento and find directory "Service" there. Inside this directory, you can find the bridge.php file.
2. Important. Edit bridge.php file
We strongly recommended changing default username (default username is 1) and password (default password is 1) to keep your store protected!
Open bridge.php file (you can open it using NotePad or WordPad) and find the following lines there:
Put your own values instead of "1" in both lines and save the entries.
Also, find out how to make Bridge connection more secure.
You may keep all other settings as they are, unless you have any errors.
3. Copy bridge to your online store root (catalog) directory. A bridge should be accessible as http://www.mystore.com/bridge.php whereas your store link is http://www.mystore.com
4. Open Store Manager -> Tools -> Preferences (F12) and enable PHP MySQL bridge connection checkbox.
5. Specify the following PHP MySQL Bridge and Local Database Connection Settings:
"Bridge URL". Specify Bridge URL, it should look like http://www.onlinestore.com/bridge.php whereas your store URL is http://www.onlinestore.com.
"Username" and "Password". Specify those you used to specify in bridge.php file (see step 2).
"Database Name". Specify local database name (type name manually) or select one from the drop-down using browse button [...].
Note: Local database and your store database are two different databases and their names may be different or may be the same, it doesn't matter.
Note: If you wish to create the new local database you can type its name manually and use test connection button. You'll see the notification that local database with specified name does not exist and Store Manager may ask you to create one.
Tip: Use the [Bridge Self Test] tool to check your website and to make sure there are no problems in your hosting configuration. Your hosting support can solve all problems found there.
Tip: Use the [Test PHP Bridge Connection] button to verify if all settings are correct.
Select "Optimize Speed" checkbox, if you want to retrieve only the required tables of Store Manager during the "Get Data from Web" operation.
6. Click [OK] to save this entry, close Presences and to connect to your local database, or click cancel to discard this entry.
Please check our troubleshooter at support.emagicone.com under Troubleshooter >> Configure Database Connection, if you need a step-by-step assistance.
Also, you can use Database Connection wizard to setup your connection
7. Now you have to retrieve data from your web store into your local database.
Note: If you use Cloudflare service with your Magento store, it may block access to the PHP bridge file. If this happens, Store Manager won’t be able to connect to your store database and display it in the grid.
Get Data from Web
Get Data from Web means each time you start working in Store Manager you should launch the appropriate command from the Preferences or the top toolbar of the program or pressing simultaneously on the following hotkeys [Ctrl+G]. It allows retrieving data from the database, which is placed remotely (somewhere locally).
1. Go to Tools -> Database Bridge -> Get Data from Web (CTRL + G)
2. Open the Preferences and in the Database connection form you will see the necessary option to perform:
Wait while data is transferred. Depending on database size and connection speed, it may take from few seconds to several hours (large database + slow connection).
Follow few steps of Backup/Restore wizard. Afterward, you get the actual store's database. Now you may work with your data - add/modify products, categories, import products etc.
Note: It is strongly recommended to make the full database backup before you proceed. You can make a backup using Tools -> Database Backup/Restore wizard.
While using bridge connection type you can check the Optimization Speed field. In the process of data extraction (retrieving) only the tables required for Store Manager will be processed during Getting Data from the Web action. We recommend to leave this option selected.
Store Manager allows configuring some advanced settings details, such as SSL version and Server Name Indication in the Database Connection form.
If you have the private SSL certificate, to make your connection more secure choose the correct version of the Secure Sockets Layer from the drop-down list and select the "Use SNI" checkbox, if you are using this extension, as well.
You can manually set the Bridge connection timeout in Advanced Database Settings of Preferences section of Store Manager:
Post Data to Web
Post Data to Web serves for data synchronization. It will post all commands stored in Pending Bridge Data section to bridge.php installed in your store. When Bridge receives the file, it executes all commands one by one in order as they were stored/made locally. After all commands are executed successfully, your remote store will reflect all changes you made locally.
Take a note, Store Manager doesn't overwrite the data from the database and doesn't erase any other information. It only posts the data that has been changed or modified and not rewrites any field of the database.
It is important to post all changes that you have made to your remote database to see them at your online store.
Select Tools -> Database Bridge -> Post Changes to Web (CTRL + P).
2. Go to Preferences -> Database Connection -> Bridge actions:
Also, you can [Clear all Changes] (will clear all commands) made locally before posting, if you do not want them to be applied to your remote database. Pay attention that you won't be able to undo this action.
Check whether all changes you made were reflected on web store properly.
If you have difficulties with "tmp" folder please check this article for help.
Note: It is strongly recommended to create a database backup before any mass operations which may be potentially unsafe.