|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Cant change MySQL-password for root
Guys.... plz help me out here.... Can't change my password for MySQL. I could do it before, but dont know what has happened now. Here is some details:
I go to the c:\mysql\bin (By the way, yes - I am using Windows 2000 Adavanced Server) to change the password. I have already started mysqld-nt.exe as a service and it is up and running. I can see that clearly in the Task Manager At this moment, the password seams to be nothing and the username "root" - as it should be, right? I write mysqladmin -u root password "secret" to change tha pass to "secret". When I press enter, it doesnt return any error-msg or anything like that. Everything seams to be fine. But now when I write mysqladmin -u root reload, I should get a error-msg that tells me that I am not authorized or something like that right? I mean, I havent yet written my pass:secret anywhere. But that is not the case. It really seams as the MySQL executes that command without even worrying about the password. In fact, I can still use any command without being prompted for my password. If I would write mysqladmin -u root -p status, the MySQL will ask me for my password. If I write secret, error-msg will be returned, saying that the pass is not right or something like that. But if I just press enter, without typing any password.... everything works just fine and MySQL returns the status information. I can even enter the MySQL>-thing without having to write in my password. WHAT IS WRONG HERE???????? Plz guys - be nice and help a poor newbie out here!!!! |
|
#2
|
|||
|
|||
|
After updating passwords and such, you need to flush privileges for the changes to take effect. Either that or restart your mysqld...
|
|
#3
|
|||
|
|||
|
Uhm... how do I flush priviligies?
Avit.... thank you so much for trying to help me out here. Only one single question remains....... how do I flush privileges? What must I write?
I can guarantee you that I have restarted mysqldnt SEVERAL times..... Thank you.... |
|
#4
|
|||
|
|||
|
You log into mysql as root, and then you simply type:
flush privileges; That's it. But since you already restarted your server, that doesn't sound like it's the problem. You could also try this: Code:
mysql -u root mysql
> UPDATE user SET password=password('secret') WHERE user='root';
> flush privileges;
That's the hands-on way of changing it... |
|
#5
|
|||
|
|||
|
THOUSANDS OF THX TO YOU
THOUSANDS OF THX TO YOU!!!! You were right and now MYSQL 4 is up and running on my comp quite properly..... Thank You so much AVIT..... this world needs more people like you
- Sitting on a big bunch of knowledge and sharing it with others!!!! |
|
#6
|
|||
|
|||
|
Quote:
Are you calling me a butthead? ![]() |
|
#7
|
|||
|
|||
|
No... i am not
No I am not! Im sorry.... my english is not...... perfect
|
|
#8
|
|||
|
|||
|
Please help with mysql
Hi Avit
I have mysql installed on server 2003. I am able to log in as root on the server which is localhost with password ''for this post i'll use a fake password" which is dana.. but when i try to log into the mysql with the hostname as the ip address 192.168.1.24 and username root with the same password :dana it says" access denied for user root etc.. is there a way for me to change the root password so i can log into it from a remote machine using mysql.. Review I can log into the server with mysql with hostname: localhost username root and password :dana but when i change the hostname to the ip address its not loggin in locally or remotely help in chaging password... can u make it as detail as possible.. thanks in advance Dujan |
|
#9
|
|||
|
|||
|
Quote:
MySQL security is a combination of database name, user, and host. You have to grant other hosts access as well. To allow any host to access the server, log in to MySQL and enter GRANT ALL ON *.* to 'root'@'%' IDENTIFIED BY 'dana'; If you want more finely-grained control, you can change *.* to just one database - like GRANT ALL ON Database1.* to 'root'@'%' IDENTIFIED BY 'dana'; or if you want to limit to a certain set of hosts, use... GRANT ALL ON *.* to 'root'@'192.168.1.%' IDENTIFIED BY 'dana'; You can check the online MySQL docs for more detail. Just search for "GRANT" syntax. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Cant change MySQL-password for root |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|