Bug #27978 Merlin Server shows Security advisor: Server Contains Default "test" Database
Submitted: 20 Apr 2007 11:51 Modified: 16 Jul 2007 2:07
Reporter: Carsten Segieth Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Installing Severity:S3 (Non-critical)
Version:1.1.1.5214, 1.2.0.6185 OS:Linux
Assigned to: BitRock Merlin CPU Architecture:Any

[20 Apr 2007 11:51] Carsten Segieth
Description:
After scheduling all advisors against Merlins MySQL itself the Security advisor

 Server Contains Default "test" Database

pops up. This does not look professional, as we deliver Merlin for 'production'
use.

Bug very similar to (already closed) bug#21921, but this one was only for Windows. So I opened a new one for Linux.

How to repeat:
- install Merlin on a clean system
- point an agent against Merlin's MySQL
- schedule all advisors

Suggested fix:
- DROP DATABASE test;   before packing
[20 Apr 2007 14:49] BitRock Merlin
Patch sent to Keith
[4 May 2007 1:18] Keith Russell
Corrected in versions => 1.1.1.5370
[8 May 2007 12:25] Carsten Segieth
tested OK on Linux with 1.1.1.5370 (but on Solaris the problem still exists, see new bugs#28302)
[8 May 2007 17:12] Peter Lavin
Added top the changelog.
[26 Jun 2007 21:17] Carsten Segieth
re-opened ... the 1.2.0.6185 Linux install created a database "test" ...
[28 Jun 2007 10:44] BitRock Merlin
I've created a little java application that deletes the test database in order to fix this issue (as we don't ship any mysql client in version 1.2). But it seems the connector-mxj generates the test database on every startup, no matter   if it was previously deleted or not. I tried issuing:

> mysql -h 127.0.0.1 -P 13306 -u service_manager --password="XXX"

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema | 
| merlin             | 
| mysql              | 
| test               | 
+--------------------+
4 rows in set (0.00 sec)

mysql> drop database if exists test;
Query OK, 0 rows affected (0.00 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema | 
| merlin             | 
| mysql              | 
+--------------------+
3 rows in set (0.00 sec)

mysql> exit;
Bye

> ./mysqlnetworkctl.sh stop    # stops tomcat
> ./mysqlnetworkctl.sh start   # starts tomcat
> mysql -h 127.0.0.1 -P 13306 -u service_manager --password="XXX"
show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema | 
| merlin             | 
| mysql              | 
| test               | 
+--------------------+
4 rows in set (0.00 sec)

As you can see the "test" database is there again. Do you know of any option inside config.properties that can affect this behaviour, so we can avoid the creation of the "test" database during startup?
[10 Jul 2007 9:35] BitRock Merlin
This case was related to a connector-mxj issue. We have tested with the latest 1.2 server that includes the regular mysql database, and the test database is properly deleted, so I think we could close this case. Please confirm on your side.
[12 Jul 2007 16:49] Andy Bang
This should be gone now that we've switched from Connector/MXJ back to a regular mysqld installation.  Looks good on Windows for me, but QA should verify.
[16 Jul 2007 2:05] Bill Weber
Verified test database not in build 1.2.0.6573.