954,600 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

mysql denying access to all users except root

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....

web_master
Light Poster
28 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 

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

varmadba
Junior Poster in Training
83 posts since Jun 2008
Reputation Points: 22
Solved Threads: 9
 

mysql can disable access by host aswell as username/password

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

GRANT ALL ON mydb.* TO 'someuser'@'somehost';


will allow all hosts

GRANT ALL ON mydb.* TO 'someuser'@'%';
asciid
Newbie Poster
5 posts since Nov 2008
Reputation Points: 10
Solved Threads: 0
 

Thanks for the reply.

I did:

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:

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.

web_master
Light Poster
28 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 

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/en/adding-users.html

asciid
Newbie Poster
5 posts since Nov 2008
Reputation Points: 10
Solved Threads: 0
 

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/en/adding-users.html


heh; yeah like what happened with david mckinnons and the U.S Miltary.

tiger86
Posting Pro
548 posts since Feb 2008
Reputation Points: 48
Solved Threads: 11
 

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

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

when i entered:

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....

web_master
Light Poster
28 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You