The default 'test' database

damn

Verified User
Joined
Nov 30, 2004
Messages
101
On my system, if somebody uploads data into the 'test' database that everybody gets as default, then its in everybody elses 'test' database too.

Why is this database needed at all, and why is it a common DB that everybody has access to?
 
That database is created by default upon MySQL's installation. You can login as da_admin and simply delete it. Problem solved :)
 
For later references:
  • Login to ssh with root (or su to root)
  • cat /usr/local/directadmin/conf/mysql.conf
  • mysql -u da_admin -p
  • type in the password that got listed when typing cat
  • enter at mysql prompt: drop database test;<enter>
  • Enter: \q<enter>
  • done :) (note, you'll have to repeat on upgrading to other mysql version)
    [/list=a]
 
Yeah, but updating MySQL makes this "test" db return. How can we turn off the creation of this db upon installing MySQL ?
 
How are you upgrading your MySQL installation, and what operating system? At least for me on Debian and FreeBSD this doesn't occur.
However this is because the binary is simply downloaded and replaces the previous version. No installation script is usually run....
 
Icheb said:
For later references:
  • Login to ssh with root (or su to root)
  • cat /usr/local/directadmin/conf/mysql.conf
  • mysql -u da_admin -p
  • type in the password that got listed when typing cat
  • enter at mysql prompt: drop database test;<enter>
  • Enter: \q<enter>
  • done :) (note, you'll have to repeat on upgrading to other mysql version)
    [/list=a]


  • Did this, test DB is still there :(

    Logged in fine, entered in "drop database test"
    mysql responded with quote "->"
    I put in "\q"
    mysql said "bye"

    Still there :(
 
You forgot the semi-colon that must append to the command your running. This tells mysql that you are done and want it to execute the command, otherwise it expects more commands to be given.

Code:
drop database test[b];[/b]

Note: You can also login as da_admin through phpMyAdmin and delete it that way with a more friendly interface.
 
jmstacey said:
How are you upgrading your MySQL installation, and what operating system? At least for me on Debian and FreeBSD this doesn't occur.

I'm using RHE and upgrading through the official RPMs...
 
That would most likely be the cause.
Since I don't use rpm's I can't give you an accurate answer, but it might be possible to provide some argument when installing that will skip that step.
I assume it preserves your mysql data and you don't have to make any modifications after installing?
 
jmstacey said:
That would most likely be the cause.
I assume it preserves your mysql data and you don't have to make any modifications after installing?

Your assumptions are correct.
 
Back
Top