If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > error in website..

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-11-11, 12:30
Vinay007 Vinay007 is offline
Registered User
 
Join Date: May 2011
Posts: 11
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 13:18.
Reply With Quote
  #2 (permalink)  
Old 05-11-11, 13:10
Vinay007 Vinay007 is offline
Registered User
 
Join Date: May 2011
Posts: 11
plzzzz help..

reply asap..
Reply With Quote
  #3 (permalink)  
Old 05-11-11, 16:33
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
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 my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #4 (permalink)  
Old 05-11-11, 16:50
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 620
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
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
  #5 (permalink)  
Old 05-12-11, 01:14
Vinay007 Vinay007 is offline
Registered User
 
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..
Reply With Quote
  #6 (permalink)  
Old 05-12-11, 03:06
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 620
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
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
  #7 (permalink)  
Old 05-12-11, 03:47
Vinay007 Vinay007 is offline
Registered User
 
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();
?>
Reply With Quote
  #8 (permalink)  
Old 05-12-11, 03:52
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
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 my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #9 (permalink)  
Old 05-12-11, 05:07
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 620
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
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
  #10 (permalink)  
Old 05-12-11, 10:25
Vinay007 Vinay007 is offline
Registered User
 
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)
Reply With Quote
  #11 (permalink)  
Old 05-12-11, 10:33
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 620
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
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
  #12 (permalink)  
Old 05-12-11, 10:47
Vinay007 Vinay007 is offline
Registered User
 
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..
Reply With Quote
  #13 (permalink)  
Old 05-12-11, 10:51
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 620
Glad to be of assistance!!
__________________
Ronan Cashell
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On