Description of problem: mysql-server used to provide a database named 'test' by default, which could have been used for mysql client that required a database name to be specified but didn't manipulate any data in rh-mysql56, the 'test' database is no longer created by default, breaking everything that relied on its existence Version-Release number of selected component (if applicable): rh-mysql56-mysql-5.6.23-2.el6 rh-mysql56-mysql-5.6.23-2.el7 How reproducible: always Steps to Reproduce: 1. have a clean system, install rh-mysql56 2. scl enable rh-mysql56 bash 3. service rh-mysql56-mysqld start 4. mysql -e "SELECT 1+1;" test Actual results: ERROR 1049 (42000): Unknown database 'test' Expected results: +-----+ | 1+1 | +-----+ | 2 | +-----+ Additional info: on RHEL6, the startup messages say: ... Alternatively you can run: /opt/rh/rh-mysql56/root/usr/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. ... which suggests that 'test' should be present (otherwise there would be nothing to remove)
I've found no documentation so far why the test database was removed, if that was some security reason or whatever else or just mistake. Anyway, I don't plan to add `test` db creation downstream, so I'd rather fix the tests to ensure the database is created.
(In reply to Honza Horak from comment #2) > so I'd rather fix the tests to ensure the database is created. so far, I've found twenty tests affected and counting ... which is the smaller problem, I can hack the library to create the database after starting mysql what is worse is that our tests are probably not the only place where 'test' is used as a database name which is always present - I've seen it in some bug reproducers from customers too but we can leave it missing and see who will complain :-) in that case, I guess this is something that would deserve to be well documented ...
(In reply to Karel Volný from comment #4) > what is worse is that our tests are probably not the only place where 'test' > is used as a database name which is always present and not just our tests - even mysql's own tests from rh-mysql56-mysql-bench fail due to this: :: [ BEGIN ] :: Running 'pushd /opt/rh/rh-mysql56/root/usr/share/sql-bench' /opt/rh/rh-mysql56/root/usr/share/sql-bench /tmp/tmp.g9UvOdAxzO /mnt/tests/CoreOS/mysql/Sanity/benchmark :: [ PASS ] :: Command 'pushd /opt/rh/rh-mysql56/root/usr/share/sql-bench' (Expected 0, got 0) :: [ BEGIN ] :: Running './run-all-tests --server=mysql --log' Got error: 'Unknown database 'test'' when connecting to DBI:mysql:database=test;host=localhost with user: '' password: '' :: [ FAIL ] :: Command './run-all-tests --server=mysql --log' (Expected 0, got 255)
So, I've checked this change with upstream and the `test` db is removed in upstream (since 5.7) from default installation, being it considered a security issue. Thus, the tests should create the `test` database if they use it.
(In reply to Honza Horak from comment #6) > So, I've checked this change with upstream and the `test` db is removed in > upstream (since 5.7) from default installation, being it considered a > security issue. ok, so let's document it > Thus, the tests should create the `test` database if they use it. I hope you mean also when used by software from mysql packages (comment #5) which you are going to fix as well as the message or maybe the whole mysql_secure_installation thingy mentioned in the bug description :-)
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHEA-2015-1059.html