[development] Database creation on Install

Yannick Warnier ywarnier at beeznest.org
Tue Nov 18 14:03:57 UTC 2008


Le jeudi 13 novembre 2008 à 23:17 -0600, Amy Stephen a écrit :
> I apologize if this is not the appropriate place to ask this question
> but I am curious after checking out your fine development work.
> 
> Why doesn't the Drupal Installation process try to create the database
> if it doesn't exist already? WordPress is the same. Joomla! will use
> the database if it exists - and create it, provided the ID has
> sufficient permissions. It's just another "make things easier" step
> (for both the "newbie" crowd, but also developers testing/working).
> 
> I was curious if there were security concerns? Or, if it just never
> seemed to be someone's itch?

Although the thread is kind of closed, I'd like to back this as a
feature request, considering testing if the database exists and trying
to create it doesn't even have to be visible to the final user, and
would be a nice improvement to the installer's usability.

Something like:
$create = @mysql_query('CREATE DATABASE ...');
if ( $create === false ) {
  // ask 
} else {
  // all good, go to next step
}

Anyway, for what it's worth, I'm just saying I think it's a good idea.

Yannick



More information about the development mailing list