If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > lost root user on new dedicated server!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-06-04, 19:55
formasfunction formasfunction is offline
Registered User
 
Join Date: Jul 2004
Posts: 3
lost root user on new dedicated server!

Okay, so I just got a small dedicated server (running RedHat Linux and MySQL 3.23) and I've been working at getting everything setup. Most of what I've been administering has been through Plesk up until this point but when I decided to move my databases over Plesk's version of phpMyAdmin just wasn't working for me so I decided to ssh in and do it myself. The only problem is that I can't get the root user to work! At first I had a root user that I created in Plesk but it turned out to not have full Grant access so I deleted it through Plesk expecting to be able to fix it through the command prompt. I followed the instructions at the mysql site for resetting privleges but when I run the last command: mysqladmin -u root flush-privileges password "mypass" it get this error:
unable to change password; error: 'Can't find any matching row in the user table'

How is it that I don't have a root user? I haven't created any other users so how do I gain back access to MySQL without entire reloading the system?

Thanks,
Greg
Reply With Quote
  #2 (permalink)  
Old 07-07-04, 02:13
inancakcan inancakcan is offline
Registered User
 
Join Date: Jun 2004
Posts: 9
I just wonder if your server was installed on a local machine. Because I worked with 3.23 on a local machine and if that is the case, MySQL server requires a root described both for "localhost" and any specific remote machine or for all remote machines, I mean "%"....Is your root account described for both or just for localhost...I am not quite sure..but I think you should check that...
Reply With Quote
  #3 (permalink)  
Old 07-07-04, 09:41
formasfunction formasfunction is offline
Registered User
 
Join Date: Jul 2004
Posts: 3
not sure

Hmmm, I think I understand what you're saying but my problem is coming from the command line so technically at that point I should be on the machine as localhost. I'm pretty sure Plesk has created a "root" user of its own because I can still add databases and users (with limited grants) with it. However, its not called "root" since MySQL is claiming that there is no user by that name. Is there anyway, as a limited MySQL user or as a root user of the actual machine to find out what the list of MySQL users is so then I could reset that password?

Thanks,
Greg
Reply With Quote
  #4 (permalink)  
Old 07-08-04, 05:14
inancakcan inancakcan is offline
Registered User
 
Join Date: Jun 2004
Posts: 9
Yes I see now...I am using MS WinNT and I can use an administrative software called as EMS MySQL Manager Ver. 2.0...and I dont know what you can use to manage users of your server. Maybe you should check EMS Hi-Tech web site for a linux version of that software. But I know a free PHP based program as PHPMyAdmin. It can work on every internet browser...including netscape I think, maybe you should try that one..

And there must be a system table callsed user including in your users information under ....\mysql\data\mysql directory....but all password information are encrypted in that table..

I think you need an administration software badly....

Good Luck...
Inanc
Reply With Quote
  #5 (permalink)  
Old 07-08-04, 07:34
guelphdad guelphdad is offline
Registered User
 
Join Date: Mar 2004
Posts: 440
This may help you on resetting root:

http://dev.mysql.com/doc/mysql/en/Re...rmissions.html
Reply With Quote
Reply

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On