LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-16-2013, 01:27 AM   #1
Earlydayrambler
Member
 
Registered: Dec 2011
Posts: 31

Rep: Reputation: Disabled
Trouble with command.


Hi,

I'm having trouble with CentOS 6.3.

I open the terminal and type $sudo mysql
Then I receive the following error..

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

Help?
 
Old 01-16-2013, 01:47 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
sudo is only used for OS accts. http://linux.die.net/man/5/sudoers

To login to MySQL, you need an acct on the database; a separate thing eg
Code:
mysql -u root -p
which will prompt you for the mysql root acct's passwd. Note this is nothing to do with the OS root acct.
Really its bad design, they should have called it dba or some such thing, to avoid confusion.
https://dev.mysql.com/doc/refman/5.1...onnecting.html
 
Old 01-16-2013, 01:58 AM   #3
Earlydayrambler
Member
 
Registered: Dec 2011
Posts: 31

Original Poster
Rep: Reputation: Disabled
It works now, thank you chrism01, I appreciate your effort!
 
  


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
Having trouble with cp command in my script. maprice Linux - General 1 03-18-2008 02:37 PM
trouble with grep command thodo Programming 3 08-19-2007 08:46 AM
Help. Having Trouble Using the MV and CP command. Ubuntu 7.04 Silver565 Linux - Software 7 08-01-2007 03:51 AM
Command-line trouble Napalm Llama Linux - Newbie 5 11-08-2004 05:29 PM
Make command trouble Malren SUSE / openSUSE 6 10-15-2004 04:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:22 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration