Connection problems to databases

Discussion in 'Integration' started by draj, Dec 29, 2006.

  1. draj

    draj New Member

    Joined:
    Dec 29, 2006
    Messages:
    252
    Hallo!

    I have databases on the same physical server configured as localhost. The server has different accounts with different I addresses and logins like with most hosts.

    The aMember resides in one account, Joomla in anathor and Xoops in the third, for logical reasons.

    While configuring the respective plugins, it gives an error: Connection to database error!

    After shifting or copying the database and installation within the same account and IP, everything works fine.

    This shows that the aMember pluggin does not connect different database to different accounts, although they are on the same physical server and localhost.

    For Joomla, it collects and stores some more information in the pluggin for connections but not for Xoops and Drupal. Therefore it would be important to develop all the plugins, regardless to which one they are, to have different fields to insert 4 basic informations as minimum. They are:

    Database Server
    Database Name
    Database User
    Database Password

    Also I have give remote connection to free and could not or did not want to install a mysql server name for security reasons. However, I would do so when the above is possible. The main reason is to have different IP addresses, domains, servers, account environments, etc.

    Currently the installation assumes some things as they are perhaps not programmed, I assume, unless I am missing something.
  2. draj

    draj New Member

    Joined:
    Dec 29, 2006
    Messages:
    252
    Hallo!

    In the /root/config.inc.php there could be following pattern:

    $pc = array();
    $pc['db'] = 'db1_name';
    $pc['user'] = 'db1_user';
    $pc['pass'] = 'db1_password';
    $pc['host'] = 'db_1.com';
    $pc['prefix'] = 'prefix_1_';

    $config = array();
    $config['db']['mysql'] = $pc;

    $pc2 = array();
    $pc2['db'] = 'db2_name';
    $pc2['user'] = 'db2_user';
    $pc2['pass'] = 'db2_password';
    $pc2['host'] = 'db_2.com';
    $pc2['prefix'] = 'prefix_2_';

    $config2 = array();
    $config2['db']['mysql'] = $pc2;

    With this, one could connect to many database residing "may be" on the same physical server but in different account.

    However, if one sees the /root/plugins/protect/name/config.inc.php of a protect plugin (which may be actually not be protecting anything!), there is no possibility to use the $config2!

    Is there a way to do this?

Share This Page