mysql denying access to all users except root

Reply

Join Date: Aug 2007
Posts: 26
Reputation: web_master is an unknown quantity at this point 
Solved Threads: 0
web_master's Avatar
web_master web_master is offline Offline
Light Poster

mysql denying access to all users except root

 
0
  #1
Jan 31st, 2009
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....
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 79
Reputation: varmadba is an unknown quantity at this point 
Solved Threads: 8
varmadba varmadba is offline Offline
Junior Poster in Training

Re: mysql denying access to all users except root

 
0
  #2
Feb 4th, 2009
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
:- Varma

We are Happy to inform launch of a new site with loads of database related information Site offers wide range of functionality Forums,Blogs,Articles,Editorials and much more
http://www.sqllibrarian.info/
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 5
Reputation: asciid is an unknown quantity at this point 
Solved Threads: 0
asciid asciid is offline Offline
Newbie Poster

Re: mysql denying access to all users except root

 
0
  #3
Feb 4th, 2009
mysql can disable access by host aswell as username/password

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

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

will allow all hosts
  1. GRANT ALL ON mydb.* TO 'someuser'@'%';
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 26
Reputation: web_master is an unknown quantity at this point 
Solved Threads: 0
web_master's Avatar
web_master web_master is offline Offline
Light Poster

Re: mysql denying access to all users except root

 
0
  #4
Feb 6th, 2009
Thanks for the reply.

I did:
  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:

  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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 5
Reputation: asciid is an unknown quantity at this point 
Solved Threads: 0
asciid asciid is offline Offline
Newbie Poster

Re: mysql denying access to all users except root

 
0
  #5
Feb 7th, 2009
sorry. my bad. that wouldnt have put a password on the user,

  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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 469
Reputation: tiger86 is an unknown quantity at this point 
Solved Threads: 10
tiger86's Avatar
tiger86 tiger86 is offline Offline
Posting Pro in Training

Re: mysql denying access to all users except root

 
0
  #6
Feb 7th, 2009
Originally Posted by asciid View Post
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.
If I helped you I would appreciate it if you would give me some reputation.
Follow the new Social Network Planet Zuda On twitter. Planet Zuda should go live sometime in 2010.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 26
Reputation: web_master is an unknown quantity at this point 
Solved Threads: 0
web_master's Avatar
web_master web_master is offline Offline
Light Poster

Re: mysql denying access to all users except root

 
0
  #7
Feb 8th, 2009
i don't get it....phpMyAdmin shows an error...

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

when i entered:

  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....
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the MySQL Forum


Views: 1133 | Replies: 6
Thread Tools Search this Thread



Tag cloud for MySQL
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC