SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Enthusiast Olivier's Avatar
    Join Date
    Nov 1999
    Location
    Florida - US
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Connection error to MySQL

    I use a RAQ server and installed MySQL on it.

    I have no problem to connect directly from the RAQ using localhost and root.

    But when I try to connect from another server with a user I created replacing the IP for localhost, I cannot connect. Same result when I and using the root user and password.

    Does someone has an idea why this is happening and how I can fix this?

    Thanks in advance,

    Olivier

  2. #2
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know this is silly but make sure you have the username and password correct for the database. Check that to see if that resolves the problem. If you are calling the DB correctly this should be the issue.

  3. #3
    SitePoint Enthusiast Olivier's Avatar
    Join Date
    Nov 1999
    Location
    Florida - US
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I actually copied the site I am using on the RAQ unto a new site and I only changed the IP but that does not work.

    Olivier

  4. #4
    SitePoint Enthusiast Olivier's Avatar
    Join Date
    Nov 1999
    Location
    Florida - US
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    UPDATE

    I looked at the documentation available at MySQL.Com and so I made certain that the Superuser had GRANT on '%' and localhost. I tested from a website on the same server using the IP of the server and the username and password of the superuser, and I can connect with no problems.

    When I copy the same exact file to another site on another server, it cannot connect.

    Need help ! Lots of it!

    Olivier
    Last edited by Olivier; Mar 4, 2002 at 13:51.

  5. #5
    SitePoint Enthusiast Olivier's Avatar
    Join Date
    Nov 1999
    Location
    Florida - US
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anybody can help me???????


    PPPPPPLLLLEEEEEEEAAAAAAASSSSSSSEEEEEE..........

  6. #6
    Apache Expert i_like_php's Avatar
    Join Date
    Nov 2001
    Location
    Dallas, Texas
    Posts
    1,342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm did you install it in the correct drive??? most times it will be C:\
    i love php

  7. #7
    SitePoint Zealot
    Join Date
    Jan 2002
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oliver,
    Contact me at james@fuelhosting.com and I will see if I can help you. I_like_php Oliver is installing MySQL on a linux based system so C:\ doesnt really apply.

  8. #8
    Apache Expert i_like_php's Avatar
    Join Date
    Nov 2001
    Location
    Dallas, Texas
    Posts
    1,342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Fuel Hosting
    Oliver,
    Contact me at james@fuelhosting.com and I will see if I can help you. I_like_php Oliver is installing MySQL on a linux based system so C:\ doesnt really apply.

    opps hey i tried to help
    i love php

  9. #9
    SitePoint Enthusiast Olivier's Avatar
    Join Date
    Nov 1999
    Location
    Florida - US
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried several things but cannot figure it out.

    The working site is:
    www.moninflavorclub.com

    (created thanks to Kevin Yank's tutorials and book)

    and the new one would be located at:
    test.monin-france.com/flavorclub/

    It uses the same database and the scripting is exactly the same.

    A test user was created:
    Username: test
    Password: testdemo

    In the db.php file, I have:
    <?php // db.php
    $dbhost = "xx.xxx.xxx.xx";
    $dbuser = "xxxxx";
    $dbpass = "xxxxx";
    function dbConnect($db="") {
    global $dbhost, $dbuser, $dbpass;
    $dbcnx = @mysql_connect($dbhost, $dbuser, $dbpass)
    or die("The database server appears to be down.");
    if ($db!="" and !@mysql_select_db($db))
    die("The site database is unavailable. At this, please try again later");
    return $dbcnx;
    }
    ?>
    Thus, the error I get is: "The database server appears to be down."

    The superuser is set to localhost and '%' with all privileges. Do I need to write something else that I would not white I am local???

    Olivier

    James. I sent you an email.


Bookmarks

Posting Permissions

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