MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old April 26th, 2003, 04:10 AM
ab3D ab3D is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: Sweden
Posts: 16 ab3D User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to ab3D Send a message via Yahoo to ab3D
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!!!!

Reply With Quote
  #2  
Old April 28th, 2003, 10:12 PM
avit avit is offline
Not Yet Perfect
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: Squamish, BC
Posts: 111 avit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via ICQ to avit
After updating passwords and such, you need to flush privileges for the changes to take effect. Either that or restart your mysqld...

Reply With Quote
  #3  
Old April 29th, 2003, 03:10 AM
ab3D ab3D is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: Sweden
Posts: 16 ab3D User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to ab3D Send a message via Yahoo to ab3D
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....

Reply With Quote
  #4  
Old April 29th, 2003, 01:48 PM
avit avit is offline
Not Yet Perfect
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: Squamish, BC
Posts: 111 avit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via ICQ to avit
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...

Reply With Quote
  #5  
Old April 30th, 2003, 02:35 PM
ab3D ab3D is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: Sweden
Posts: 16 ab3D User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to ab3D Send a message via Yahoo to ab3D
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!!!!

Reply With Quote
  #6  
Old April 30th, 2003, 02:53 PM
avit avit is offline
Not Yet Perfect
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: Squamish, BC
Posts: 111 avit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via ICQ to avit
Wink Re: THOUSANDS OF THX TO YOU

Quote:
...Sitting on a big bunch of knowledge...

Are you calling me a butthead?

Reply With Quote
  #7  
Old April 30th, 2003, 02:55 PM
ab3D ab3D is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: Sweden
Posts: 16 ab3D User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to ab3D Send a message via Yahoo to ab3D
No... i am not

No I am not! Im sorry.... my english is not...... perfect

Reply With Quote
  #8  
Old February 28th, 2007, 02:49 PM
Dujan Dujan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2007
Posts: 1 Dujan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 35 sec
Reputation Power: 0
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

Reply With Quote
  #9  
Old March 26th, 2007, 11:53 PM
Maz2331 Maz2331 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2007
Posts: 12 Maz2331 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 57 m 53 sec
Reputation Power: 0
Quote:
Originally Posted by Dujan
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..

Dujan


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.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > Cant change MySQL-password for root


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway