Results 1 to 13 of 13
  1. #1
    Join Date
    May 2011
    Posts
    11

    Unanswered: error in website..

    Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'justsignup_zzl'@'192.168.1.1' (using password: YES) in /www/zzl.org/j/u/s/justsignup/htdocs/signup2.php on line 4
    mysql_error


    plzz help me.. its working on xampp control panel but its not working on web..
    Last edited by Vinay007; 05-11-11 at 14:18.

  2. #2
    Join Date
    May 2011
    Posts
    11

    plzzzz help..

    reply asap..

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    check your user permissions
    how are you GRANTing access to the db.

    this error message usually appears when
    the username has insufficient permissions or doesn't exist
    note depednign on how you define the permissions you may also need to grant permissions for a specific user for a specific hostname or IP address.
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    This message usually appears when failing to login to a MySQL server. You will need to check that the user exists in the database, that its host setting is either % or 192.168.1.1. The password must also be correct that you are logging in with.

    To view the values issue the following SQL:

    SELECT User, Host FROM mysql.user WHERE User = 'justsignup_zzl';

    One further observation which seems a little odd is that you are attempting to access the database from 192.168.1.1 which is usually used as a router/gateway IP address.
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

  5. #5
    Join Date
    May 2011
    Posts
    11

    not satisfied

    when i run it on http://localhost/xampp/signup2.php mysql_connect is running.. but wen i put this file signup2.php on web using filezilla its giving me this error..i also tried with username root which is working in xampp but not on website..

    plzzz help..

  6. #6
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    Please have a look at my previous posting. Your issue is related to login permissions. The User specifies a login username. This does not mean that you can login from anywhere with that user unless the host has a value of '%'. In your case you are logging in from a host 192.168.1.1 are you sure you have permissions to login from this IP address. If you print out the following SQL results I can determine what you would need to change:

    SELECT User, Host FROM mysql.user WHERE User = 'justsignup_zzl';
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

  7. #7
    Join Date
    May 2011
    Posts
    11
    its neither giving me error in mysql_error nor its printing anything..

    <?php
    $con=mysql_connect("localhost","root","tiger") or die(mysql_error);
    mysql_select_db("signup");

    $result = "SELECT User, Host FROM mysql.user WHERE User = 'justsignup_zzl'";
    if(!mysql_query($result))
    {
    echo mysql_error();
    }
    else
    {
    echo "aaa";
    $result1=mysql_query($result);
    while($row=mysql_fetch_array($result1))
    {
    echo "bbbb";
    echo $row['User'];
    echo $row['Host'];
    }
    }
    mysql_close();
    ?>

  8. #8
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by it-iss.com View Post
    One further observation which seems a little odd is that you are attempting to access the database from 192.168.1.1 which is usually used as a router/gateway IP address.
    yes some routers use 192.168.1.1, but by no means all. its not a universal standard. IIRC Linksys use that address, but netgear use 192.168.0.1, some BT installations 192.168.1.255 and so on. so it may be a perfectly valid local IP address
    I'd rather be riding on the Tiger 800 or the Norton

  9. #9
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    If this executes without a problem and without errors then the issue is that the user 'justsignup_zzl' is not created in your database. You will need to add that user to make your code work.
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

  10. #10
    Join Date
    May 2011
    Posts
    11
    i added user in the database..
    now its showing me the output of user and host..

    justsignup_zzl
    justsignup.zzl.org

    still same error is der..
    Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'justsignup_zzl'@'192.168.1.1' (using password: YES) in /www/zzl.org/j/u/s/justsignup/htdocs/signup2.php on line 3
    Access denied for user 'justsignup_zzl'@'192.168.1.1' (using password: YES)

  11. #11
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    This

    justsignup_zzl
    justsignup.zzl.org

    does not match justsignup_zzl'@'192.168.1.1'

    Issue the following command:

    UPDATE mysql.user SET Host = '192.168.1.1' WHERE User = 'justsignup_zzl';

    with root user and this should then give you access.
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

  12. #12
    Join Date
    May 2011
    Posts
    11
    hey i just loaded my database from phpmyadmin to zymic.com mysql database and created user on dat web hosting site now its working..
    thanx for ur help ronan..

  13. #13
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    Glad to be of assistance!!
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

Posting Permissions

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