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. Any suggestions? Thanks! -j |
and you're sure you're typing in the correct password, right?
|
Yep, the password i'm typing is correct. I've tried all possibilities.
|
is root the only user for your databases? I'm trying to find some more info online for ya. Post back up if I find anything. Is there sensitive information in your database right now?
Remember the password is case sensitive. |
have you tried setting the root password for MySQL ?
mysqladmin -u root -p password 'your_new_password' TT |
-tommy-
great call, I just assumed he'd gotten past that point. any luck with that Jevnin? |
what you mean, any luck with that Jesmin?
TT |
Still not working... :-(
[root@localhost mythtv]# mysqladmin -u root -p password 'josh' Enter password: mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user: 'root@localhost' (Using password: YES)' There is no sensitive information in my database now. In fact, if I can just wipe out all the mysql settings and just start over I'll be happy...but I don't want to reinstall linux! |
Okay, I just now noticed this and its a double post. Which one you want to close, the one here or the one in Linux - General as your breaking our rules you agreed to when registering? Let me refresh your mind:
http://www.linuxquestions.org/rules.php Let me know so I can either report this one or close the other one where I found your solution most likely. |
did you set this on as well ?
mysqladmin -u root -h localhost password 'new-password' is mysql on ? if not do a ( chkconfig mysql on ) then /etc/init.d/mysql start check status /etc/init.d/mysql status easy one but its for droping databases only. mysqladmin -u root -p drop name_of_database Sample below mysqladmin -u root -p drop nuke TT |
Nevermind, I didn't feel like waiting so I closed the other thread.
The solution is to put single quotes around your password: mysql -uroot -p'password' And that should log you in since without quotes, it doesn't like the ) in your password. And don't cross post in the future please, its uncalled for and unecessary. |
sorry for cross-posting...didn't read the rules close enough, will be more careful in the future.
-j |
Quote:
|
I am having a similar problem....it seems that if I set a password for the root account the mysqld will not start when the server is turned on. if I remove the password then mysqld will start, but that creates a security issue for my becasue im trying to incorporate phpmyadmin aswell, which needs to be installed in the documnet root, so there needs to be a password set.. what am I doing wrong?
thanks in advance, Jeremy |
Hi mate
I found that i also could set the root password etc using phpmyadmin look under settings or perms forgotton what it was, haven't got the other PC up at this stage. TT |
All times are GMT -5. The time now is 09:36 PM. |