Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 05-18-2005, 01:13 AM   #1
LQ Newbie
Registered: Nov 2003
Posts: 5

Rep: Reputation: 0
Sarge mysql-server Access denied for user: root@localhost

I'm having trouble installing the mysql-server on debian sarge. I've run apt-get install mysql-server, and ran mysql_install_db. When I try to set the root password for the mysql root I get:

mysqladmin -u root password
error: 'Access denied for user: 'root@localhost' (Using password:NO)'

Any help would be appreciated. Thanks.
Old 05-18-2005, 06:06 AM   #2
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,479

Rep: Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481
mysqladmin -u root password your-password
If that doesn't work then do it from mysql:
shell> mysql -u root mysql
mysql> SET PASSWORD FOR root@localhost=PASSWORD('new_password');
Old 05-18-2005, 11:42 PM   #3
LQ Newbie
Registered: Nov 2003
Posts: 5

Original Poster
Rep: Reputation: 0
I'm stupid I figured it out. Evidently I had previously set the mysql root password and trying to set it using mysqladmin -u root -p password gives an error because it is already set. I was able to log in using:
mysql -u root -p
Enter password:
And now it works fine. Too much late night programing.


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
MySQL: 'access denied for user' turbo_acura Linux - General 1 10-20-2004 08:34 AM
Directory access denied to root user: inode hack? netmar Linux - Security 2 07-31-2004 04:53 AM
mySQL Access denied for user Gerardoj Linux - General 2 03-21-2004 10:13 AM
why I got "Access denied for user: 'root@localhost'" likedreamer Red Hat 1 11-09-2003 05:06 AM
MYSQL access denied for user c0c0deuz Linux - General 1 03-18-2003 02:44 PM

All times are GMT -5. The time now is 04:02 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