LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-20-2004, 08:49 AM   #1
turbo_acura
Member
 
Registered: Sep 2004
Location: London, UK
Posts: 95

Rep: Reputation: 15
MySQL: 'access denied for user'


I get this error msg when i try to run /usr/local/mysql/bin/mysql
'Error 1045: Access Denied for user: 'root@localhost' (using password: NO)'

I see different postings on the net about resetting the password, but it talks about running the 'mysql' command to begin with, but thats where I can't get past!
 
Old 10-20-2004, 09:34 AM   #2
looseCannon
Member
 
Registered: Dec 2003
Location: Little Rock, AR
Distribution: Fedora Core 2, AIX, HP-UX, Solaris, Whitebox
Posts: 193

Rep: Reputation: 31
There are some flags you can pass along with the command. The one you need to use is the '-p' (password) flag. That will let you specify the password with the command.

There are two ways to do it with this flag:

1) /usr/local/mysql/bin/mysql -p <put password here>
2) /usr/local/mysql/bin/mysql -p
You'll be prompted for the password after hitting enter.

The second option is more 'secure', and might be a better option if you have a box that is in a DMZ or is in a highly visible area.

Do a man on the mysql command to see the other flags you can pass. You can do a lot with this command.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sarge mysql-server Access denied for user: root@localhost infinity432 Linux - Software 2 05-19-2005 12:42 AM
mySQL Access denied for user Gerardoj Linux - General 2 03-21-2004 11:13 AM
getting access denied , when trying to access camera as normal user bennythepitbull Linux - Hardware 2 11-04-2003 03:30 AM
MYSQL access denied for user c0c0deuz Linux - General 1 03-18-2003 03:44 PM
MySQL - access denied X11 Linux - Software 1 08-19-2002 06:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:05 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration