Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004

    Unanswered: Everything goes wrong when resetting root pass


    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.


  2. #2
    Join Date
    Mar 2004
    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


    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts