469,081 Members | 1,804 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,081 developers. It's quick & easy.

Mysql: access denied

Hi,
I can only access mysql through the root by typing mysql -u root -p. But
when I use any other user to connect to mysql I get the access denied error
message. Mysql is installed on windows xp. I looked up information online
to solve this problem and saw that there are some scripts that i may be able
to run in order to fix the problem. But I am not sure how to handle those
scripts since they are only made for unix systems. I tried to connect to
the server using PHP, but i cant connect as well. I am really new to this
and would appreciate the least help..

The way i am create users is by inserting a user in the user table.. or by
granting privileges to a random user. Is there any other way of creating
users? The way I am checking whether a user account is working is by typing
mysql -u username -ppassword. Is there any other way of doing this.. Anyone
know why access denied but the users i created do show in the user table

Thanks

Jul 20 '05 #1
2 2648

"adnan alsamari" <sc*******@rochester.rr.com> wrote in message
news:RR*******************@twister.nyroc.rr.com...
Hi,
I can only access mysql through the root by typing mysql -u root -p. But
when I use any other user to connect to mysql I get the access denied error message. Mysql is installed on windows xp. I looked up information online
to solve this problem and saw that there are some scripts that i may be able to run in order to fix the problem. But I am not sure how to handle those
scripts since they are only made for unix systems. I tried to connect to
the server using PHP, but i cant connect as well. I am really new to this
and would appreciate the least help..

The way i am create users is by inserting a user in the user table.. or by
granting privileges to a random user. Is there any other way of creating
users? The way I am checking whether a user account is working is by typing mysql -u username -ppassword. Is there any other way of doing this.. Anyone know why access denied but the users i created do show in the user table


Try logging in as root then grant access to other users:

suppose your database you are granting access is called "mydb"

GRANT ALL ON mydb.* TO username@localhost;

Check the mysql documentation for more information at
http://dev.mysql.com/doc/mysql/en/SQL_Syntax.html
Jul 20 '05 #2
mysql> GRANT ALL PRIVILEGES ON yourdb.* TO 'root'@'localhost'
IDENTIFIED BY 'yourpass'
--
raqueeb hassan
congo (drc)
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Ryan Schefke | last post: by
3 posts views Thread by c_chen | last post: by
reply views Thread by bruce | last post: by
reply views Thread by bruce | last post: by
2 posts views Thread by adnan alsamari | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.