Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I noticed some weird things in the db table of mysql database in a client's server, after having the Mysql service stopping for no reason screenshot

  1. what are the test, and test_% entries?
  2. Why are there two entries for the database AQUA?
  3. Why is there a entry with a blank name?

Should I worry about any of those? What should I do for each specific case? Is it safe to just delete the ones that should not be there, after backing up?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Question 1. Please remove the two entries test and test_% immediately. The book "MySQL 5.0 Certification Study Guide" (ISBN 0-672-32812-7) Chapter 35 is about Securing the MySQL Installation. It recommends removing these. Notice that all permissions have Y for test and test_% except Grants_priv. With this, I can do malicious things to a test database or any database that start with 'test_' in its name. Here is an example of something malicious that can be done to a test database:

USE test<BR>
CREATE TABLE tb (a INT);<BR>
INSERT INTO tb VALUES (1);<BR>
INSERT INTO tb SELECT * FROM tb; <<-- Do This 30 times<BR>

you have an instant 4GB file.

A malicious person can make many of these in a test database.

Worse yet, in some instances a person with these credentials can login to the test database with no password from a default installation of MySQL.

Conclusion: Remove test user immediately !!!

Question 2. This one is OK

There are two different users that has access to the AQUA database

root@localhost

dbcon@localhost

They have different access privileges.

Just run these commands and see the difference in access privileges

SHOW GRANTS FOR root@localhost;

SHOW GRANTS FOR dbcon@localhost;

Question 3. Remove this one too. The same book reference I made in question 1 also highly recommends removing this also. That entry will allow anonymous users to login against any database. In other words, no user and no password is allowed. Remove this one !!!

share|improve this answer
    
Great answer. Thank you! –  ooops Feb 21 '11 at 10:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.