Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 17th March 2012, 03:37 AM
ubersoft Offline
Registered User
 
Join Date: Mar 2010
Posts: 35
linuxfirefox
MySQL claims there is not root password. MySQL refuses to let me set one.

... I'm starting to lose faith in my ability to understand things.

So as I've mentioned in the past, I'm coming here from Kubuntu, and the differences in installation may be making it more difficult for me to unravel this, but...

Kubuntu doesn't come with mysql installed, and when you install it, it asks you to provide a password for the root mysql account.

In Fedora it appears to be pre-installed? I say this because when I try to uninstall it, it wants to uninstall php and many parts of kde as well.

At any rate, I'm having trouble using it. "Trouble" meaning "I can't use it for anything."

So I tried to access it by command line from root, i.e.

su -
[enter password]
mysql

and I get this message:
error: 'Access denied for user 'root'@'localhost' (using password: NO)

Using password NO? OK, so I need to set a password...

mysqladmin -u root password 'PASSWORD HERE'

and I get:
error: 'Access denied for user 'root'@'localhost' (using password: NO)

... ok, maybe I can't do it as root?

so I exit root

exit

and try again from my account

mysqladmin -u root password 'PASSWORD HERE'

and I get:
error: 'Access denied for user 'root'@'localhost' (using password: NO)

So... what idiocy have I committed to put me in this situation? Anyone?
Reply With Quote
  #2  
Old 17th March 2012, 03:48 AM
smr54 Offline
Registered User
 
Join Date: Jan 2010
Posts: 5,501
linuxchrome
Re: MySQL claims there is not root password. MySQL refuses to let me set one.

Not sure how you got in the situation. At any rate

http://www.wikisecurityinfo.com/how-...indows-server/

may be useful.

It's possible that at present no password is set

what if you try something like

mysql -u root (and hit enter). I haven't experienced this for awhile, but it's possible that it will then ask for a password and if you just hit enter, put you into mysql where you can then set a password.
Reply With Quote
  #3  
Old 17th March 2012, 04:13 AM
ubersoft Offline
Registered User
 
Join Date: Mar 2010
Posts: 35
linuxfirefox
Re: MySQL claims there is not root password. MySQL refuses to let me set one.

Typing mysql -u root gives me the same error ("Access denied for user 'root'@'localhost' (using password: NO)

I have no idea how I did this to myself, but I'm pretty sure I should get some kind of award for it.

---------- Post added at 11:13 PM ---------- Previous post was at 11:07 PM ----------

The first step on the wiki page you linked to has me shut down mysql. I can't even do that any more!

I'm... confused.
Reply With Quote
  #4  
Old 17th March 2012, 02:05 PM
smr54 Offline
Registered User
 
Join Date: Jan 2010
Posts: 5,501
linuxchrome
Re: MySQL claims there is not root password. MySQL refuses to let me set one.

You could try service mysqld stop. It's probably in systemd somewhere, so might be something like

systemctl stop mysqld.service

Or just, as root

pkill mysql


I'm leery of giving advice because I'm not running it anywhere. Hopefully, someone with more mysql knowledge will chime in here.
Reply With Quote
  #5  
Old 17th March 2012, 09:28 PM
SteveGYBE Offline
Registered User
 
Join Date: Jun 2007
Location: Lytham St Annes, Lancashire, UK
Posts: 338
linuxfirefox
Re: MySQL claims there is not root password. MySQL refuses to let me set one.

The command is
Code:
mysql -u <username> -p <password>
Or type the following to be prompted to enter the password without it appearing on the screen
Code:
mysql -u <username> -p


---------- Post added at 08:28 PM ---------- Previous post was at 08:16 PM ----------

Let's see what you have installed - post the output from the following
Code:
rpm -qa mysql*
Reply With Quote
  #6  
Old 17th March 2012, 11:42 PM
ubersoft Offline
Registered User
 
Join Date: Mar 2010
Posts: 35
linuxfirefox
Re: MySQL claims there is not root password. MySQL refuses to let me set one.

OK, this is strange. When I type rpm -qa mysql* I get no output at all. Either from my local account, or as root. Does it write to a file somewhere?
Reply With Quote
  #7  
Old 18th March 2012, 12:13 AM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 6,031
linuxfirefox
Re: MySQL claims there is not root password. MySQL refuses to let me set one.

try

Quote:
rpm -qa mysql
or specifically to query 'mysql'

Quote:
rpm -q mysql
if you really want to wildcard to rpm via -qa do it this way:
Quote:
rpm -qa 'mysql*'
(wrap in single quotes so the shell doesn't try to expand it)

When I do that I get:
Quote:
rpm -qa 'mysql*'

mysql-embedded-5.5.20-1.fc16.x86_64
mysql-server-5.5.20-1.fc16.x86_64
mysql-5.5.20-1.fc16.x86_64
mysql-connector-java-5.1.17-1.fc16.1.x86_64
mysql-libs-5.5.20-1.fc16.x86_64

Last edited by marko; 18th March 2012 at 12:17 AM.
Reply With Quote
  #8  
Old 18th March 2012, 12:34 AM
Doug G Offline
Registered User
 
Join Date: Jul 2005
Posts: 640
linuxfirefox
Re: MySQL claims there is not root password. MySQL refuses to let me set one.

From a command line run mysql_secure_installation which will let you set/reset the root password. Also you can use mysqladmin to change the root password.
__________________
======
Doug G
======
Reply With Quote
  #9  
Old 18th March 2012, 01:36 AM
ubersoft Offline
Registered User
 
Join Date: Mar 2010
Posts: 35
linuxfirefox
Re: MySQL claims there is not root password. MySQL refuses to let me set one.

OK, progress!

rpm -qa 'mysql*'

gives

Code:
mysql-embedded-5.5.21-1.fc16.x86_64
mysql-utilities-1.0.3-0.5.2.38.fc16.1.noarch
mysql-server-5.5.21-1.fc16.x86_64
mysql-workbench-5.2.38-1.fc16.x86_64
mysql-libs-5.5.21-1.fc16.x86_64
mysql-connector-python-0.3.2-2.fc16.noarch
mysql-5.5.21-1.fc16.x86_64
OK, so I then ran sudo mysql_secure_installation and it gives me this:

Code:
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!


In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
So my problem has been it keeps giving me a "using password:NO" response, so I just hit enter, and get:

Code:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Enter current password for root (enter for none):
... fine, be that way. I type in my root password, and get:

Code:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Enter current password for root (enter for none):
YOU HAVE GOT TO BE KIDDING ME.

OK, how do I completely reinstall mysql from scratch without removing most of my desktop?
Reply With Quote
  #10  
Old 18th March 2012, 02:49 AM
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 6,031
linuxfirefox
Re: MySQL claims there is not root password. MySQL refuses to let me set one.

this isn't a Fedora problem I think it's a Mysql quirk with how it
accepts the password, take a look here at the "password: YES" and "password: NO" cases

http://dev.mysql.com/doc/refman/5.1/...ss-denied.html
Reply With Quote
  #11  
Old 18th March 2012, 03:31 AM
ubersoft Offline
Registered User
 
Join Date: Mar 2010
Posts: 35
linuxfirefox
Re: MySQL claims there is not root password. MySQL refuses to let me set one.

Thank you all!

Based on the mysql site links and your suggestions on how to kill mysqld I was, with much pain and anguish, actually able to fix this problem. I hope I never, ever, ever have to do this again.
Reply With Quote
Reply

Tags
claims, mysql, password, refuses, root, set

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I change the root password of MYSQL server Muideen Installation, Upgrades and Live Media 8 19th March 2009 06:42 PM
Big problem resetting mysql root password rob2000007 Using Fedora 3 5th December 2005 07:38 PM
root password for mysql Ridgerunner Servers & Networking 3 13th September 2005 10:10 PM
Setting password for mysql root user. BrandonV Using Fedora 10 24th July 2005 11:08 PM


Current GMT-time: 11:24 (Monday, 01-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat