943,852 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Unsolved
  • Views: 2009
  • MySQL RSS
Jan 31st, 2009
0

mysql denying access to all users except root

Expand Post »
i created a new user with all the privileges in mysql and it didn't work. no user works except "root with no password" which is why i created several user and tried it...still didn't work....if anyone know what is wrong....please lemme know....

thank you....
Reputation Points: 10
Solved Threads: 0
Light Poster
web_master is offline Offline
28 posts
since Aug 2007
Feb 4th, 2009
0

Re: mysql denying access to all users except root

What does the error message say?

It depends on your error message
if its says access denied then it the problem with mysql /username/password
but if its saying can't reach mysql server its the connectivity problem
Reputation Points: 22
Solved Threads: 9
Junior Poster in Training
varmadba is offline Offline
83 posts
since Jun 2008
Feb 4th, 2009
0

Re: mysql denying access to all users except root

mysql can disable access by host aswell as username/password

eg. user@localhost may work, but user@169.1.1.1 wont.

MySQL Syntax (Toggle Plain Text)
  1. GRANT ALL ON mydb.* TO 'someuser'@'somehost';

will allow all hosts
MySQL Syntax (Toggle Plain Text)
  1. GRANT ALL ON mydb.* TO 'someuser'@'%';
Reputation Points: 10
Solved Threads: 0
Newbie Poster
asciid is offline Offline
5 posts
since Nov 2008
Feb 6th, 2009
0

Re: mysql denying access to all users except root

Thanks for the reply.

I did:
MySQL Syntax (Toggle Plain Text)
  1. GRANT ALL ON mydb.* TO 'username'@'localhost';

but there is a password in this user thats y it probably it gives an error. "couldn't find the field in table users."

and for reference the error it shows in my web app is:

MySQL Syntax (Toggle Plain Text)
  1. Warning: mysqli::mysqli() [mysqli.mysqli]: (28000/1045): Access denied for user 'username'@'localhost' (USING password: YES)

and works perfectly fine if i use root with no password.
Reputation Points: 10
Solved Threads: 0
Light Poster
web_master is offline Offline
28 posts
since Aug 2007
Feb 7th, 2009
0

Re: mysql denying access to all users except root

sorry. my bad. that wouldnt have put a password on the user,

sql Syntax (Toggle Plain Text)
  1. GRANT ALL PRIVILEGES ON mydb.* TO 'username'@'localhost' IDENTIFIED BY 'some_pass';

i advise setting a root password. major security risk.

edit:
http://dev.mysql.com/doc/refman/5.1/...ing-users.html
Last edited by peter_budo; Feb 10th, 2009 at 8:31 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
asciid is offline Offline
5 posts
since Nov 2008
Feb 7th, 2009
0

Re: mysql denying access to all users except root

Click to Expand / Collapse  Quote originally posted by asciid ...
sorry. my bad. that wouldnt have put a password on the user,

GRANT ALL PRIVILEGES ON mydb.* TO 'username'@'localhost' IDENTIFIED BY 'some_pass';

i advise setting a root password. major security risk.

edit:
http://dev.mysql.com/doc/refman/5.1/...ing-users.html
heh; yeah like what happened with david mckinnons and the U.S Miltary.
Reputation Points: 48
Solved Threads: 11
Posting Pro
tiger86 is offline Offline
540 posts
since Feb 2008
Feb 8th, 2009
0

Re: mysql denying access to all users except root

i don't get it....phpMyAdmin shows an error...

#1133 - Can't find any matching row in the user table

when i entered:

MySQL Syntax (Toggle Plain Text)
  1. GRANT ALL PRIVILEGES ON mydb.* TO 'username'@'localhost' IDENTIFIED BY 'password';

i have checked it at-least 20 times if i was making a mistake somewhere....but i cant seem to find any....i'm doing exactly what you're saying....how can it not find that field when i can see it...

and when i made this user i did grant all the privileges if thats what the above command is for.

and thanks for the password on root tip....i do have a password now....thanks....
Reputation Points: 10
Solved Threads: 0
Light Poster
web_master is offline Offline
28 posts
since Aug 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: Mysql and php optimization please!!! :(
Next Thread in MySQL Forum Timeline: Query not work in MYSQL 4 only in 5..





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC