LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-04-2009, 05:22 PM   #1
kaplan71
Member
 
Registered: Nov 2003
Posts: 718

Rep: Reputation: 39
DBI Connect Failed:Access denied for user ''@'localhost' to database <database> error


Hi there --

I am trying to run a mysql 5.0.56 distribution, and whenever I try to either change the root password, or create a database, the following error message appears:

Quote:
DBI Connect Failed:Access denied for user ''@'localhost' to database <database>
The database was installed via yum onto a CentOS 5.3 server. I tried removing, and then reinstalling the database via yum, but the results were the same. What do I need to do in order to correct this problem?
 
Old 06-04-2009, 06:35 PM   #2
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 82
Put these commands in exactly as I describe them, one line after another. Don't forget the semi-colon:
Code:
mysql -u root
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyPW');
exit
obviously changing MyPW to something you are happy with.
 
Old 06-04-2009, 06:48 PM   #3
kaplan71
Member
 
Registered: Nov 2003
Posts: 718

Original Poster
Rep: Reputation: 39
Hi there --

Thanks for your reply. I went through the commands that you listed, but the error message I got was the following:

Quote:
ERROR 1133 (42000): Can't find any matching row in the user table
What is the next move to make? Thanks.
 
Old 06-05-2009, 12:39 PM   #4
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 82
Hmmm. Took a quick google search of your last error message, and found this: http://ircarchive.info/mysql/2007/4/13/15.html. See if that helps. I reckon you're typing ROOT instead of root, am I correct?
 
  


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 04:15 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