If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Everything goes wrong when resetting root pass

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-29-04, 10:26
Analyzer Analyzer is offline
Registered User
 
Join Date: Apr 2004
Posts: 38
Everything goes wrong when resetting root pass

Hi,

This is my first message I'm trying to use mysql in my home computer and i installed MySql 5.0 Everything works fine with it but when i change the password of "root" everything blows up.WinMySQLAdmin also does not show Server info and other server properties in its main window.But when i reset password of root, everything works fine.I can not find a solution on this? I'm evaluation of the Navicat and it always give "Bad Handshake" error
I'm changing (resetting) password like this : (from manual)


**************************************************
Open a console window to get to the DOS command prompt:
Start Menu -> Run -> cmd

We are assuming that you installed MySQL to `C:\mysql'. If you installed MySQL to another location, adjust the following commands accordingly. At the DOS command prompt, execute this command:
C:\> C:\mysql\bin\mysqld-nt --skip-grant-tables

This starts the server in a special mode that does not check the grant tables to control access.
Keeping the first console window open, open a second console window and execute the following commands (type each on a single line):
C:\> C:\mysql\bin\mysqladmin -u root
flush-privileges password "newpwd"
C:\> C:\mysql\bin\mysqladmin -u root -p shutdown
**************************************************

As described in manual.But i'm not sure i restarted server again.

So i need to change passwords which are default users and does not have any password (like "root").
Can i remove user root,root@localhost,localhost...., these default users? If so, how? If i can not remove how should i set a password for root safely?
Thanks in advance.

Analyzer
Reply With Quote
  #2 (permalink)  
Old 04-30-04, 08:46
guelphdad guelphdad is offline
Registered User
 
Join Date: Mar 2004
Posts: 440
Quote:
C:\> C:\mysql\bin\mysqladmin -u root
flush-privileges password "newpwd"
C:\> C:\mysql\bin\mysqladmin -u root -p shutdown
This is wrong. You don't flush-privileges and try to add the password at the same time.

When you are connected to mysql as root you can access the mysql database and add a new password for root to the user table

OR

grant all privileges on *.*
to user root@localhost
identified by
(use plain password only, no quotes, no brackets, no
word password)

with grant option;

In the first case above you need to flush privileges.
In the second case you don't need to flush privileges

Obviously replace the bold above with an actual password.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On