Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2004
    Bay Area

    dabase one server & php one server

    Hi all,

    since one of my account using Vb forum very buzy, It makes mysql fail constantly. what I heard we can spilt the load by install database in one server and php file in another one.
    great! but is anyone here done that before? if so how to do it ?
    please step by step guide me how to establish the "handshake" between 2 server ?
    What I did so far is created the acct. where the database located one one server ( let called db_ server) and have all php file, forum file in another server ( called php_server) then from the forum config file, I changed "localhost" point to the db_server IP.
    But luck .. it did not work that way .
    Anyone have better guideline please help
    It's just the same like last time!!!

  2. #2
    Join Date
    May 2002
    it is not very big problem. you may connect to mysql server by using mysql port (3306 usually), so, in your forum settings, you need indicate ip address or server name which you use as mysql server (instead "localhost") and indicate port paramater in your function which used for making connections to mysql server.

    PS. exmaple:

    $link = mysql_connect("you server ip:3306", "mysql_user", "mysql_password")
    or die("Could not connect: " . mysql_error());
    print ("Connected successfully");
    Rustelekom LLC Dedicated server since 2002, RIPE NCC member, LIR, AS51168

  3. #3
    Join Date
    Jan 2004
    Bay Area
    yeah.. I tried that already but it did not work ... here is the error

    Database error in vBulletin :

    Link-ID == false, connect failed
    mysql error:

    mysql error number: 0

    Date: Friday 29th of July 2005 03:57:55 PM

    Here what I did
    server A ( xx.xx.xx242) where the database located at

    server B ( xx.xx.xx.252) where the php files located at

    then I edit the forum config files as

    // ****** DATABASE SERVER NAME ******
    // This is the hostname or IP address of the database server.
    // It is in the format HOSTORT. If no PORT is specified, 3306 is used.
    // If you are unsure of what to put here, leave it at the default value.
    $servername = 'xx.xx.xx.242:3306';

    // ****** DATABASE USERNAME & PASSWORD ******
    // This is the username and password you use to access MySQL.
    // These must be obtained through your webhost.
    $dbusername = 'testing_forum';
    $dbpassword = 'test12345';

    // ****** DATABASE NAME ******
    // This is the name of the database where your vBulletin will be located.
    // This must be created by your webhost.
    $dbname = testing_forum;

    // ****** TECHNICAL EMAIL ADDRESS ******
    // If any database errors occur, they will be emailed to the address specified here.
    // Leave this blank to not send any emails when there is a database error.
    $technicalemail = [email protected]';
    Last edited by vietkool; 07-29-2005 at 07:09 PM.
    It's just the same like last time!!!

  4. #4
    Join Date
    May 2002
    first try connect to your mysql server from shell, foolow this steps:

    1) telnet 3306
    if you get answer, like something Mysql version ....
    your mysql accept external connection
    2) next step:
    mysql -u username -p -h -P 3306
    you will asked for password, if you fill password and got connected to remote mysql server, your connection is correct.
    3) if this construction in php not work $servername = 'xx.xx.xx.242:3306'; try other (you will need rewrite code for forum function which connect to mysql). detailed description you may find here:
    Rustelekom LLC Dedicated server since 2002, RIPE NCC member, LIR, AS51168

  5. #5
    Join Date
    Jun 2000
    Washington, USA
    You may have a firewall blocking the MySQL connection.

  6. #6
    Don't you have to give the MySQL server the IP address of the server that will be connecting remotely? ... otherwise it will just block it.
    Neil McGeehan
    Reseller Web Hosting - At YouGotHosting, we provide affordable, reliable, dependable web hosting.
    Providing quality service since 2002

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts