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

OK, did I just destroy my database?

Status
Not open for further replies.

Coderifous

Programmer
Dec 13, 2001
782
0
0
US
A little background info: working on 'localhost' developing a website with Perl/MySQL/Apache. The box isn't on a network or anything so whatever is wrong should be fixable from my keyboard...

In attempting to alter user access, I deleted a couple of lines from my "user" table in the mysql database. I thought they were just stray entries I had entered in my naivety.

Now I can't access the mysql client or interact with the MySQL server at all becuase it says:

ERROR 1130: Host 'localhost' is not allowed to connect to this MySQL server

For the love of god some one tell me how to fix this!!!!!

--Jim
 
I am not certain how to un-do it, but the mysql file structure is pretty straight forward, so you could probably copy all the db and table files to another location, reinstall mysql, then copy back the table files, ommiting the user files.

There is probably an easier way to do this, but I don't know what it is
 
An easier means of recovery is to shutdown the MySQL server, then restart with the
Code:
--skip-grant-tables
option. This will allow universal access into your database so you'll be able to get back in and fix your
Code:
user
table. Then restart the server again.

-Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top