[NTLUG:Discuss] MySQL question

Paul Ingendorf pauldy at wantek.net
Mon Jul 29 17:46:17 CDT 2002


This should be all you have to do.

delete from user where user='' or user='neil';
update user set password='' where user ='root';

Then you want to quit and reload the acl for the database with something like 

mysqladmin reload

This should have you to a default install type setup.

The other thing you would check are your access control tables like columns_priv, db, func, host, and tables_priv.
It is pretty safe to just empty out all these tables for a default setup.  You can do this will the following syntax.

delete from <table>;

Definitely make sure you have all the flags set to y for root in the user table before you reload or you won't be able to get back into the database.  You will really want to check out the mysql manual on permissions of  database so you understand a bit how this works so you will feel comfortable making appropriate changes to secure the database.


-----Original Message-----
From: discuss-admin at ntlug.org [mailto:discuss-admin at ntlug.org]On Behalf
Of Bobby Wrenn
Sent: Monday, July 29, 2002 10:45 AM
To: discuss at ntlug.org
Subject: Re: [NTLUG:Discuss] MySQL question


On Friday 26 July 2002 02:41 pm, you wrote:
> Try this:
> $ mysql -u root -p mysql
> msyql> select User, Password, Host from user;

Did all that and get the following:
+--------+------------------+-----------------------+
| user   | password         | host                  |
+--------+------------------+-----------------------+
| root   | 7705896139c3146a | localhost             |
| root   |                  | localhost.localdomain |
|        |                  | localhost             |
|        |                  | localhost.localdomain |
| neil   |                  |                       |
| neil   | 7705896139c3146a | %                     |
+--------+------------------+-----------------------+

So, I have more than one root and more than one neil. Is there a way to 
return the mysql database to default install state?

TIA
Bobby

_______________________________________________
http://www.ntlug.org/mailman/listinfo/discuss





More information about the Discuss mailing list