Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL Password Not Working

EDIT: I had MySQL installed twice on my machine (XAMPP & on its own)

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

like image 953
Anthony Avatar asked Feb 06 '10 21:02

Anthony


4 Answers

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.

like image 107
Anthony Avatar answered Oct 18 '22 15:10

Anthony


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

like image 33
Eli Avatar answered Oct 18 '22 16:10

Eli


If you set mySQL to not begin running on startup, then you need to start it prior to attempting to login. This can be done via the command line, via the task manager if you configured it as a windows service, etc.

For example, here is an explanation of starting the service using cmd

Starting MySQL from the Windows Command Line | MySQL

like image 2
austinthemassive Avatar answered Oct 18 '22 15:10

austinthemassive


For me (and my similar problem),

--password = mypass

didn't work, but

--password="mypass"

did.

like image 2
inteblio Avatar answered Oct 18 '22 16:10

inteblio