What is this MySQL Error ?

Discussion in 'MySQL' started by taktikz, Dec 16, 2008.

  1. #1
    Click on "Free Image Hosting" in my sig...

    It started happening after installing wordpress.... I deleted wordpress, but it didn't fix anything.

    Any idea of what I can do to fix this?


    "Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'mujeresd_admin'@'localhost' (using password: YES) in /home/mujeresd/public_html/imglab.com/inc/config.php on line 7
    Could not connect "
     
    taktikz, Dec 16, 2008 IP
  2. Maxso

    Maxso Peon

    Messages:
    45
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Can you show us line 7 please
     
    Maxso, Dec 16, 2008 IP
  3. diligenthost

    diligenthost Peon

    Messages:
    685
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Your password is most likely wrong, or it could be the username. Check the config.php file against your information about your databases supplied by your host.
     
    diligenthost, Dec 16, 2008 IP
  4. taktikz

    taktikz Active Member

    Messages:
    692
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    75
    #4
    <?
    
    include("db.php");
    
    
    
    $link = mysql_connect($db_server, $db_user, $db_password) or die("Could not connect");
    
    mysql_select_db($db_name) or die("Could not select database");
    
    $query = "SELECT * from config";
    
    $result = mysql_query($query) or die("Query failed");
    
    while ($row = mysql_fetch_assoc($result)) { 
    
            $config[$row['soption']]=$row['svalue'];
    
    }
    Code (markup):

    I haven't touched this file... it's strange.
     
    taktikz, Dec 16, 2008 IP
  5. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #5
    Fix the username and password in the

    include("db.php");

    file
     
    jestep, Dec 16, 2008 IP
  6. Toopac

    Toopac Peon

    Messages:
    4,451
    Likes Received:
    166
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Reset the password to that hosting account to what it was before, sometimes mysql acts funny.
     
    Toopac, Dec 16, 2008 IP
  7. Maxso

    Maxso Peon

    Messages:
    45
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    have you changed any of the following.

    DB name and password on your hosting

    db.php

    Remember it is case sensitive.
     
    Maxso, Dec 16, 2008 IP
  8. taktikz

    taktikz Active Member

    Messages:
    692
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    75
    #8
    thanks, fixed!!
     
    taktikz, Dec 16, 2008 IP
  9. Maxso

    Maxso Peon

    Messages:
    45
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Haha no problem. First time i have helped someone :D. Im abit of a noob to php.
     
    Maxso, Dec 16, 2008 IP