LinuxQuestions.org
Visit Jeremy's Blog.
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



Closed Thread
 
Search this Thread
Old 05-30-2004, 10:27 PM   #1
jevnin
LQ Newbie
 
Registered: May 2004
Distribution: Fedora Core 2
Posts: 8

Rep: Reputation: 0
Trouble Logging in to mysql


I continuously get this error when trying to log in to mysql:

[mythtv@localhost sbin]$ mysql -u root -p
Enter password:
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

If I leave off the -p, I get a similar error:

[mythtv@localhost sbin]$ mysql -u root -p
Enter password:
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

I do this after using 'su' to get into my root account. I get the same errors when I actually log in to root. I'm sure the password I'm typing is correct, however the first characher in the password is ')'. Perhaps this is causing the error? Any suggestions? Thanks!

-j
 
Old 05-30-2004, 10:34 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
If this is locally on the same machine try:

mysql -uroot -p<password>

Notice no spaces.

Also did you actually setup a default root password after installing mysql? If you su to root, you can actually connect by just typing:

mysql

You can update the passwords once in mysql that way, etc.

mysql> GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'new-password' WITH GRANT OPTION;

And to commit the changes do a:

mysql> FLUSH PRIVILEGES;

I'd suggest creating another user though, not necessarily but I tend to not use root as a user on anything.. just a habit..
 
Old 05-30-2004, 10:43 PM   #3
jevnin
LQ Newbie
 
Registered: May 2004
Distribution: Fedora Core 2
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks for the tips...but:

[mythtv@localhost mythtv]$ mysql -uroot -p)*****
bash: syntax error near unexpected token `)'
[mythtv@localhost mythtv]$ mysql -uroot -p<)*****>
bash: syntax error near unexpected token `)'
[mythtv@localhost mythtv]$ su
Password:
[root@localhost mythtv]# mysql
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
[root@localhost mythtv]# mysql -uroot -p<)evozo4i>
bash: syntax error near unexpected token `)'
[root@localhost mythtv]# mysql -uroot -p<')evozo4i'>
bash: syntax error near unexpected token `newline'
[root@localhost mythtv]# mysql -uroot -p')evozo4i'
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

Frustrated...
-j
 
Old 05-31-2004, 01:11 AM   #4
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Did you ever setup a default password for root after installation of mysql? And the password is without the <> signs unless its part of your password you initially setup. Is this when your logged into locally to the machine running mysql? Do you also have a ) in your password, since your showing that is the case in the errors your getting?
 
Old 05-31-2004, 01:14 AM   #5
jevnin
LQ Newbie
 
Registered: May 2004
Distribution: Fedora Core 2
Posts: 8

Original Poster
Rep: Reputation: 0
yes, i do have an ) in the password I initially defined...
-j
 
Old 05-31-2004, 01:19 AM   #6
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally posted by jevnin
yes, i do have an ) in the password I initially defined...
-j
Well it doesn't like it in the syntax, try with single quotes around the password:

mysql -uroot -p'password'
 
Old 05-31-2004, 01:23 AM   #7
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Please refer to this thread: http://www.linuxquestions.org/questi...hreadid=187769
 
  


Closed Thread


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
Trouble logging in spartn119 Slackware 11 12-14-2004 04:31 PM
trouble logging in into Linux Redhat 6.0 irmwakimn Linux - Software 2 07-21-2004 09:52 AM
Trouble Logging in to mysql jevnin Linux - Newbie 41 06-16-2004 11:01 PM
having trouble logging in paul62 Slackware 2 03-28-2004 07:52 AM
Logging out of X and into trouble LonnieB Linux - General 2 07-05-2003 08:31 AM


All times are GMT -5. The time now is 08:19 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration