1.5 Direct Connection through HTTP Tunnel
HTTP tunnel is an alternative way of connecting to your database which possesses the advantages of both direct and bridge connection.
This type of connection is useful if you don’t have the direct access to MySQL database. Also, you don’t need to do POST \ GET operations to synchronize data with your store (as for bridge connection type), all changes will be reflected in real-time.
To configure HTTP Tunnel connection, follow a few steps listed below:
- Open your application main directory - follow this step "C:\Program Files (x86)\eMagicone\Store Manager for WooCommerce\" and find directory "Service" there. Inside this directory, you can find sm_tunnel.php file.
2. Copy sm_tunnel.php file to your online store root (catalog) directory via FTP. Tunnel should be accessible from the web as here - http://www.onlinestore.com/sm_tunnel.php whereas http://www.onlinestore.com is your store URL. If you upload file correctly, you will receive the message - “Tunnel script is installed correctly. You can establish connections through the HTTP tunnel.”
3. Open your store root folder (by using any FTP client) -> and find there wp-config.php file. View it by using some program for previewing such as Notepad. Take into account the following lines:
If localhost is specified here, you should use your store URL (without http://www) in the appropriate field of Store Manager settings.
4. In your Store Manager open Preferences -> press the appropriate button - 'Add new configuration'- in the window and then put the name of the configuration.
5. Next, check the field 'Direct connection through HTTP Tunnel'.
6. Specify Remote Database Connection Settings:
- Tunnel address - specify tunnel address, it should look like http://www.onlinestore.com/sm_tunnel.php , where - http://www.onlinestore.com - is your store URL (as an example).
- Port - 3306 is used in most cases (please ask your hosting provider to check if the one is used).
- Host, Username (login), Password and Database (name) - specify your hostname, database username, password and database name, which you have found in your wp-config.php file (see an illustration above).
You may type database name manually or use the button to see a list of all available databases and select the one you need from the drop-down:
7. Use the 'Test Connection' button to verify if your settings are correct and connection to your remote database is possible.
8. Click 'OK' to save this entry and complete the configuration or click 'Cancel' to continue. Close 'Preferences' to connect to your database.