views:

240

answers:

4

Hi, When I enter my password into MySQL Command Line Client, it rejects my password, gives 1 beep and closes the window. Can anyone provide me with a basic troubleshooting list of steps (from simple to progressively more technical) to regain entry into MySQL once and for all. Also, can anyone tell me what can cause my password to suddenly be rejected? I am also running XAMPP and the MySQL service is both installed and running. Thanks in advance.

I remember when I first got this problem some months ago, if I recall correctly, I solved it by starting the MySQL service from Windows XP's Administrative Tool (something I did stopped the MySQL service and to this day I don't know what it was).

Now the problem has started back again but this time, when I checked Services, the MySQL service was already 'started'.

Any assistance will be appreciated. Thanks

A: 

Do you have the password for the root account? If so Try this from the command line?

    mysql --user=root --password=your password here
    -- or --
    mysql --user=root --password=your password here --database=MySQL
James
Thanks for your reply James.If I recall correctly, my password is the root pass.Ok, the first thing MySQL Command Line Client propts me for is the password doing the above did not work.So I tried Window command line, I tried the above mentioned commands at both my root directory (C drive) and inside the MySQL folder. The error message I got was 'root' is not recognized as an internal or external command.... Im I doing something wrong when inputing these commands?
01010011
A: 

My password suddenly worked again so I took the following steps to change it:

  1. Using Windows Command Prompt, navigate to MySQL's bin directory
  2. Type: mysqladmin -uroot -p password yourNewPassword
  3. Press enter. You will be prompted for your password, enter it
  4. If no error messages/beeps happen, your password was successfully changed
  5. Log in using MySQL Command Prompt with your new password

What I don't understand is, WHY all of a sudden my password started back to work after approximately 24 hours? I wish I know so I can avoid this in the future.

01010011
A: 

Is there an error message when it rejects your password? I wonder if perhaps you are using an outdated client and running into this issue: http://dev.mysql.com/doc/refman/5.1/en/old-client.html

Eli
+2  A: 

Hi, I think I figured out why my password was not working. I had two versions of MySQL installed on my machine (XAMPP and MySQL 5.1). So I deleted the MySQL 5.1 and it worked.

01010011