1.3. Direct Connection to MySQL Database

fmPreferences

Let's check step-by-step instruction on how to configure a direct connection to your store database.

1. Go to Settings -> Preferences -> Database Connection and enable "Direct Connection to the store database" checkbox.

Select connection

2. You have to specify the following settings to be able to connect:

Database connection settings
  • "MySQL Host" (i.e. Server Address). Usually it is your website name like "mywebsite.com" or "servername.com" (do not include http://www. prefix); you may use IP address, as well. Please check your store server parameters (see wp-config.php, most likely you can find it at your store /includes directory). There, you can find your database server name (host).

$glob['dbhost'] = 'servername.com'

If any is defined here (like http://www.servername.com), you should use the one (servername.com).

If it is defined as "localhost", it means you should use your store name.

Port - 3306 is used in most cases (please ask your hosting provider to check if the one is used).

  • "Username" (login), "Password" and "Database" (name). Specify your username, password and database name. You can find them at the bottom of global.inc.php file:

$glob['dbdatabase'] = 'remote_database_name' //your database name is defined here

$glob['dbpassword'] = 'password' //your password is defined here

$glob['dbusername'] = 'username' //your User Name (login) is defined here

You may type database name manually or use [Select Database] to see the list of available databases and select the one you need from the drop-down.

Select database

Tip: Use the [Test Connection] button to verify whether all settings are correct and connection to your remote database is possible.

Connection is sucessfully

3. Click [OK] to save this entry, close "Preferences" to connect to your database, or click [Cancel] to discard this entry.

If you're unable to connect to a remote database, here are a few key items to check.

If you got such message as:

Access Denied Message

you have to add your IP address to an Access List and allow direct MySQL connections.

Please see an article to find out how to add your IP to the Access List.