LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 10-29-2011, 11:01 PM   #1
OtagoHarbour
Member
 
Registered: Oct 2011
Posts: 312

Rep: Reputation: 3
Messed Up MySQL. Need to Reinstall


I am using Ubuntu 11.10.

In stalled LAMP using the directions described here. It worked great. Unfortunately I then followed the security advice outlined here. After following this advice

Quote:
mysql> DELETE FROM user WHERE NOT (host = "localhost" AND user = "ReallyLongLongName");
mysql> FLUSH PRIVILEGES;
mysql is now unusable. It could well be that I chose too long a name for "mydbadmin". So when I try to log in I try to log in using
Code:
mysql -u ReallyLongLongName -p
I get
Quote:
ERROR 1045 (28000): Access denied for user 'ReallyLongLongNa'@'localhost' (using password: YES)
Maybe I can fix the problem by adjusting mysql to take longer names. Failing that I need to uninstall mysql so that I can reinstall it.

Could someone please help with this?

Thanks,
Peter.
 
Old 10-30-2011, 04:29 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,732

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
Hi,

Quote:
So when I try to log in I try to log in using
Code:

mysql -u ReallyLongLongName -p

I get
Quote:
ERROR 1045 (28000): Access denied for user 'ReallyLongLongNa'@'localhost' (using password: YES)
Are you prompted for a password and are sure you're using the correct password for the "ReallyLongLongName" user?
You can reset it if you want, be following the instructions here

Regards
 
Old 10-30-2011, 07:28 AM   #3
OtagoHarbour
Member
 
Registered: Oct 2011
Posts: 312

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by bathory View Post
Hi,


Are you prompted for a password and are sure you're using the correct password for the "ReallyLongLongName" user?
You can reset it if you want, be following the instructions here

Regards
Yes. It is definitely the right password. My problem the root name for mysql is no longer "root" and I cannot use the new root name for some reason. That is why I want to completely uninstall mysql and reinstall it.

Thanks,
Peter.
 
Old 10-30-2011, 08:50 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,732

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
Quote:
My problem the root name for mysql is no longer "root" and I cannot use the new root name for some reason. That is why I want to completely uninstall mysql and reinstall it.
You can uninstall mysql and start over if you like, but it's worth a try to reset the "ReallyLongLongName" user password. I guess this is the user you replaced mysql root with.

Regards
 
Old 10-31-2011, 11:14 AM   #5
OtagoHarbour
Member
 
Registered: Oct 2011
Posts: 312

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by bathory View Post
You can uninstall mysql and start over if you like, but it's worth a try to reset the "ReallyLongLongName" user password. I guess this is the user you replaced mysql root with.

Regards
I never had any problems remembering the password. I think the user name probably exceeded the table allocation for user names.

I decided to just back what I needed up and reinstall Ubuntu. I then went the through MySQL securing steps more carefully and everything seems to be fine now. If there is a way to just reinstall MySQL or LAMP, rather than reinstalling Ubuntu, that would be preferable should I encounter a similar problem in the future.

Thanks,
Peter.
 
Old 10-31-2011, 11:50 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,732

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
Hi,

Quote:
If there is a way to just reinstall MySQL or LAMP, rather than reinstalling Ubuntu, that would be preferable should I encounter a similar problem in the future.
No need to reinstall the whole OS for something like this. Use either synaptic or "apt-get remove" to remove the package(s) you want.

Regards
 
Old 10-31-2011, 12:15 PM   #7
OtagoHarbour
Member
 
Registered: Oct 2011
Posts: 312

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by bathory View Post
Hi,


No need to reinstall the whole OS for something like this. Use either synaptic or "apt-get remove" to remove the package(s) you want.

Regards
Thanks for the info.

Peter.
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Messed up my desktop. Need to reinstall compiz and desktop effect jobbe Linux - Software 2 09-20-2007 01:35 AM
I'm new, and I think I might have messed up the mySQL server sohhos Linux - Newbie 8 10-04-2003 12:24 AM
reinstall mysql or rebuild mysql?? dsiguy Linux - Software 3 07-15-2003 08:11 AM
Messed up when installing linux, erased win Me...Need to reinstall is it possible?re wolfyheart Linux - Newbie 6 10-23-2001 11:23 AM
Messed up when installing linux, erased win Me...Need to reinstall is it possible?re wolfyheart Linux - General 4 10-20-2001 12:59 PM


All times are GMT -5. The time now is 12:56 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration