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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
05-30-2004, 06:21 PM
|
#1
|
LQ Newbie
Registered: May 2004
Distribution: Fedora Core 2
Posts: 8
Rep:
|
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
|
|
|
05-30-2004, 09:33 PM
|
#2
|
Member
Registered: Aug 2003
Location: Texas, USA
Distribution: Slackware 9.1, SuSE 9.1
Posts: 245
Rep:
|
and you're sure you're typing in the correct password, right?
|
|
|
05-30-2004, 09:56 PM
|
#3
|
LQ Newbie
Registered: May 2004
Distribution: Fedora Core 2
Posts: 8
Original Poster
Rep:
|
Yep, the password i'm typing is correct. I've tried all possibilities.
|
|
|
05-30-2004, 11:21 PM
|
#4
|
Member
Registered: Aug 2003
Location: Texas, USA
Distribution: Slackware 9.1, SuSE 9.1
Posts: 245
Rep:
|
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.
Last edited by Rico16135; 05-30-2004 at 11:22 PM.
|
|
|
05-30-2004, 11:51 PM
|
#5
|
Senior Member
Registered: Nov 2003
Location: Western Australia
Distribution: GUI Ubuntu, Server Ubuntu, HamPi, Skywave, DragonOS, many other's
Posts: 1,039
Rep:
|
have you tried setting the root password for MySQL ?
mysqladmin -u root -p password 'your_new_password'
TT
|
|
|
05-30-2004, 11:55 PM
|
#6
|
Member
Registered: Aug 2003
Location: Texas, USA
Distribution: Slackware 9.1, SuSE 9.1
Posts: 245
Rep:
|
-tommy-
great call, I just assumed he'd gotten past that point.
any luck with that Jevnin?
|
|
|
05-30-2004, 11:57 PM
|
#7
|
Senior Member
Registered: Nov 2003
Location: Western Australia
Distribution: GUI Ubuntu, Server Ubuntu, HamPi, Skywave, DragonOS, many other's
Posts: 1,039
Rep:
|
what you mean, any luck with that Jesmin?
TT
|
|
|
05-31-2004, 01:10 AM
|
#8
|
LQ Newbie
Registered: May 2004
Distribution: Fedora Core 2
Posts: 8
Original Poster
Rep:
|
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!
|
|
|
05-31-2004, 01:21 AM
|
#9
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
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.
|
|
|
05-31-2004, 01:23 AM
|
#10
|
Senior Member
Registered: Nov 2003
Location: Western Australia
Distribution: GUI Ubuntu, Server Ubuntu, HamPi, Skywave, DragonOS, many other's
Posts: 1,039
Rep:
|
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
|
|
|
05-31-2004, 01:24 AM
|
#11
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
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.
|
|
|
05-31-2004, 02:18 AM
|
#12
|
LQ Newbie
Registered: May 2004
Distribution: Fedora Core 2
Posts: 8
Original Poster
Rep:
|
sorry for cross-posting...didn't read the rules close enough, will be more careful in the future.
-j
|
|
|
05-31-2004, 02:33 AM
|
#13
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Quote:
Originally posted by jevnin
sorry for cross-posting...didn't read the rules close enough, will be more careful in the future.
-j
|
Nevermind that now, did the single quotes work at all?
|
|
|
06-04-2004, 03:56 AM
|
#14
|
Member
Registered: Jan 2004
Location: Ashland, Oregon
Distribution: Fedora Core 1 & 2
Posts: 51
Rep:
|
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
|
|
|
06-04-2004, 04:07 AM
|
#15
|
Senior Member
Registered: Nov 2003
Location: Western Australia
Distribution: GUI Ubuntu, Server Ubuntu, HamPi, Skywave, DragonOS, many other's
Posts: 1,039
Rep:
|
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 02:20 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|