SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: MySQL Help

  1. #1
    SitePoint Enthusiast SFWoA_Online's Avatar
    Join Date
    Jun 2001
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL Help

    <?
    # Database server to connect to
    $dbhost = "coaster_sfwoa@localhost";
    # Database to use
    $db = "coaster_sfwoa";
    # Database username
    $dbuser = "sfwoa";
    # Database password
    $dbpasswd = "********";
    # Counter table touse
    $table = "counter";
    # User Database Table
    $userdatabasetable = "users";
    #URL you want people to be forwarded to
    $pageurl = "http://sfwoa.coaster-mania.com/index2.php";
    ?>

    What am I doing wrong?...it gives me errors such as

    Warning: MySQL Connection Failed: Unknown MySQL Server Host 'coaster_sfwoa@localhost' (2) in /home/coaster/public_html/sfwoa/linkexchange/adduser.php on line 28
    Unable to connect to SQL server!

    MySQL isnt working for me!

    Please try to help me...
    Six Flags Worlds of Adventure Online
    http://sfwoa.coasterbuzz.com

  2. #2
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    could be a couple things... but it looks like its going wrong when you are trying to connect to the database...

    you are using localhost as the hostname, then Im assuming that you have the script running on hte same server as the mysql host?? if not, that is your problem... if it is, it could be your username or password thats wrong

  3. #3
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    actually.. I dont even see you trying to connect to the database.. I have no idea why it would be giving that error.. is that all the code?

  4. #4
    SitePoint Enthusiast SFWoA_Online's Avatar
    Join Date
    Jun 2001
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    The script is running on the same server. (Coaster-Mania). That snippet is just from the configuration file for the program. It is when I go into such files as adduser.php on my published site, that I get these errors.

    I wonder how I will ever fix this MySQL problem...
    Six Flags Worlds of Adventure Online
    http://sfwoa.coasterbuzz.com

  5. #5
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    could u post the code in which u are using to connect to the database??


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
  •