LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 06-15-2009, 10:46 AM   #1
shogun1234
Member
 
Registered: May 2004
Posts: 165

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 (http://forums.mysql.com/read.php?11,...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

Code:
mysqld_safe

mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --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 (http://dev.mysql.com/doc/refman/5.1/...ss-denied.html), 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 2.6.27.8/ mysql 5.0
 
Old 06-15-2009, 11:12 AM   #2
forrestt
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 '127.0.0.1' 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 127.0.0.1 to localhost (not recommended by me) or just add a duplicate root entry with 'localhost' replacing the '127.0.0.1' and then restart mysqld or flush your grant tables.

HTH

Forrest
 
  


Reply


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


All times are GMT -5. The time now is 06:58 AM.

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