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 |
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.. ;) |
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 |
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?
|
yes, i do have an ) in the password I initially defined...
-j |
Quote:
mysql -uroot -p'password' |
Please refer to this thread: http://www.linuxquestions.org/questi...hreadid=187769
|
All times are GMT -5. The time now is 05:19 AM. |