Why doesn't the installer try to run a CREATE DATABASE IF NOT EXIST query, in order to try to automatically create the database?

If the query fails, Drupal says the user they have to manually create the database.

I was thinking that there seems to be no good reason to not try to create it.
I know many people out there use shared hosting accounts and they don't have the CREATE DATABASE privilege, but this also generally means that they already have a database.

Let me know.

Thanks, Giovanni

Comments

xcorex’s picture

agree.

pasqualle’s picture

Version: 6.4 » 7.x-dev
Priority: Minor » Normal
budda’s picture

It seems silly not to do this simple task before demanding the user to do it manually.

install_database_errors() kicks off db_run_tasks(). Should the create database be done first as a test (include/install.inc), or should it be done before the db_run_tasks() gets run in install.php?

webchick’s picture

This looks like it's slightly older, and has at least the start of a patch: #203955: Create database at installation time

webchick’s picture

Status: Active » Closed (duplicate)
amontero’s picture

I've put together an install profile and works for mysql driver.
You can check it on my sandbox at http://drupal.org/sandbox/amontero/1535766.
Feedback welcome.