LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trouble with command. (https://www.linuxquestions.org/questions/linux-newbie-8/trouble-with-command-4175445793/)

Earlydayrambler 01-16-2013 12:27 AM

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?

chrism01 01-16-2013 12:47 AM

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

Earlydayrambler 01-16-2013 12:58 AM

It works now, thank you chrism01, I appreciate your effort!


All times are GMT -5. The time now is 09:45 AM.