Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 06-15-2009, 10:46 AM   #1
Registered: May 2004
Posts: 180

Rep: Reputation: 15
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

I use debian's apt-get/ aptitude to install mysql 5.0 on the laptop. However, after installation completes, I can not login using `mysql -u root -p`. The command prompt always complains ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES).

I search on the internet, discovering several solution. Unfortunately, neither reset password (,...6593#msg-46593) using debian-sys-maint to reset password or use mysqld_safe would work. I am completely confused. What should I do to find the possible root cause?

Also, I've check the processes


mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/ --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock

logger -p daemon.err -t mysqld_safe -i -t mysqld
with regards to the binding parameter (, there is no restriction showing that it only allow localhost connect (Even so, indeed I connect on the machine, not on the remote server).

How can I solve such problem? Or where to find resource that explain this better?

Many thanks,

Environment: Debian lenny/ kernel mysql 5.0
Old 06-15-2009, 11:12 AM   #2
Senior Member
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
Do you actually have 'localhost' listed in the Host field of the mysql users table for a root user? You may have '' listed instead. To MySQL these aren't the same. It is a bit confusing I know, but if you don't have localhost, you can either change to localhost (not recommended by me) or just add a duplicate root entry with 'localhost' replacing the '' and then restart mysqld or flush your grant tables.




Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) samnjugu Linux - Software 12 01-22-2013 06:22 AM
mysql server ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using pas tarak420 Linux - Server 2 09-18-2008 09:52 PM
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) ShaqDiesel Linux - Server 1 09-11-2008 11:49 PM
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) S canegames Debian 11 07-18-2007 12:57 PM
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) mohtasham1983 General 2 04-02-2007 06:36 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration