Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
install system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Sep 2008 at 16:21 UTC
Updated:
16 Apr 2012 at 19:43 UTC
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
Comment #1
xcorex commentedagree.
Comment #2
pasqualleComment #3
buddaIt 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?
Comment #4
webchickThis looks like it's slightly older, and has at least the start of a patch: #203955: Create database at installation time
Comment #5
webchickComment #6
amonteroI'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.