Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

lost root on new dedicated server! 1

Status
Not open for further replies.

formasfunction

Technical User
Jul 6, 2004
7
US
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
 
yeah, thats actually the tutorial that I was doing when I ran into the trouble. The trouble is, that assumes that you already have a root user. Apparently I don't and I have no idea what user is acting as root. I'm guessing Plesk is using some sort of root since it can still create databases and new users. How do I create a new root?

--Greg
 
You can delete the /var/lib/mysql/mysql/* <--(note 2x mysql)
directory, then run the mysql_install_db script again, recreating the mysql database with a root use and no password.

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Hello, I believe we need to do something similar, see some programmers left and took the root passwords with them. It looks like we need to take the db down to perform the steps outlined in I am wondering how dangerous this is for me being a mysql newbie, even a newbie newbie... If I follow these to the T will I have any problems do you believe? Also, what would be a good way to back this thing up before we sink our teeth into this preceedure? Thanks you guys!!!
Steve
 
Its been a while since I fixed this, and I can't remember if that was the method I used, but I was a relatively new user when it came to MySQL and I ended up alright. I'm not sure if that helps you out at all but good luck!

--Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top