Bug #9183 Bug Fixed

Installer can’t create database

Version: EE 2.0.0b02 20091008 Reporter: Jamie Rumbelow

This is an archived bug report. If you are experiencing a similar issue, upgrade to the latest release and if that does not solve the problem, submit a new bug report

I run the installer on my local machine with my local MySQL. I enter my database details, everything seems to go fine. I then enter a database name that doesn’t exist, expecting it to be created. I then press next and I get a Database Error: Unable to select specified database.

I’m running on root so it definitely has permissions (and I’ve created databases directly from PHP before), so I think it’s a code issue.

  • Creation of a database during install is not a supported feature. Please note step one of the installation instructions in the user guide:

    Note: You will need to either create your database or have an existing database before running the ExpressionEngine installation. This can usually be done either using something such as phpMyAdmin or through your web hosting account control panel.

    Reason being, most hosted environments do not allow their users to create new databases. Though it would make a good feature request for servers that allow it.

    Keeping this as a bug, though, since if we keep the current behavior, you’ve just demonstrated that we need to either make that notation in the install form itself, or at least when the error is encountered.

    Derek Jones
    17th October, 2009 at 12:14pm
  • In the installer there is a note just below the database name field that says:

    Note: If the database does not exist the installer will attempt to create it. However, depending on your server settings this may not be possible.

    So maybe that’s a bug 😊

    Jamie Rumbelow
    17th October, 2009 at 12:18pm
  • Ha, indeed, was just coming back to post that. Either way we need to get our information in sync!

    Derek Jones
    17th October, 2009 at 12:25pm
  • Ah yes, I knew this was looking familiar. That was ripped out of CI in Oct. of 2008 because it wouldn’t work unless you were already able to connect successfully to a database, which was a little silly. The DB_Forge class and Loader expect to be able to use the database class via the CI super object, which won’t exist in said object until initialize() is done, and this step was being done during initialization. No go.

    So we just need to modify EE 2.0’s expectation on whose responsibility it is to try to create the database upon failure.

    Derek Jones
    17th October, 2009 at 12:43pm
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases