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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

user "root" accidentally deleted

Status
Not open for further replies.

johnccy

IS-IT--Management
Aug 2, 2002
14
MY
i am mysql newbie, when i want to change mysql user password, accidentally i delete the root user, when i restart mysql service.. i can't connect to database any more.. it prompt out to say that there is no user "root" found.

can anyone help me?

rgds,
john
 
When you install mysql theres a script to run which sets up the root account , run that again.

I thinks its called mysql_install_db or something like that, been a long time since I deleted root :) ______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
i tried mysql_install_db under my /usr/bin directory, it run successfully, but the problem still maintain the same. please help.

rgds,
john
 
you need to edit that script as there is a test if the default tables exist
i think uncommenting that test lines would help
 
any help file about mysql_install_db? i opened up this script but don't know where to make comment.. i meant where is the test lines..
thanks a lot..
:->
 
well there's no help about changing this file ;-)
it's just a shell script, so what you need to look for is help for shell scripting
and to help you out, the lines are 205, 206 and 239
that should do the job
 
i got it..
thanks..

rgds,
johnccy
%-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top