Array
(
    [0] => Warning
    [1] => Undefined array key "language"
    [2] => /home/whmcsdev/public_repo/wbteampro.major-release/installation/modules/addons/wbteampro/initialize.php
    [3] => 282
)
Array
(
    [0] => Warning
    [1] => Undefined property: stdClass::$state
    [2] => /home/whmcsdev/public_repo/wbavatax.master/installation/modules/addons/wbavatax/hooks.php
    [3] => 942
)
Array
(
    [0] => Deprecated
    [1] => htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated
    [2] => /home/whmcsdev/public_repo/wbavatax.master/installation/modules/addons/wbavatax/hooks.php
    [3] => 279
)
cPanel - Inbound Remote MySQL Connections - Knowledgebase - WHMCS Dev
Dev License: This installation of WHMCS is running under a Development License and is not authorized to be used for production use. Please report any cases of abuse to abuse@whmcs.com

cPanel - Inbound Remote MySQL Connections Print

  • 2

To enable a MySQL Database on a LAMP server to receive incoming connections from a remote location you will need to setup the following:
  1. LAMP Server configured with MySQL
  2. Incoming port (3306 by default) configured to allow connections
  3. Incoming port (3306 by default) configured within MySQL
  4. Database & User created
    - in cPanel this id done on a per account basis from the MySQL Databases screen
  5. Remote Access Hosts configured
    - in cPanel this is done on a per account basis from the Remote Database Access Hosts screen
    - if you do not have a specific IP address for the remote server that will be connecting, you can use %.%.%.% to represent all IP's

Once the above is completed you can use a local copy of phpMyAdmin to connect to the remote server.  An example of the config.inc.php file would be:

/*
* First server
*/
$i++;
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'dbuser';
$cfg['Servers'][$i]['password'] = 'dbpass';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;

If you receive an 2000 error "mysqlnd cannot connect to MySQL 4.1+ using old authentication" then you will need to follow the instructions found on this thread (http://stackoverflow.com/questions/1575807/cannot-connect-to-mysql-4-1-using-old-authentication)

  1. Login to server as root user
  2. Login to mysql as the user that you created for remote access
  3. # mysql -u dbuser -h localhost -p
  4. Once logged in as the remote user, change the password to a legacy format
    SET SESSION old_passwords=FALSE;
    SET PASSWORD = PASSWORD('dbpass');



        

Was this answer helpful?

« Back

Powered by WHMCompleteSolution