Opened 4 years ago
Closed 4 years ago
#9747 closed defect (bug) (wontfix)
Installer does not try to create the database if it fails to select
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Upgrade/Install | Version: | 2.8 |
| Severity: | normal | Keywords: | needs-patch |
| Cc: |
Description
while doing a test for #9706 i needed to deleted wordpress to get a new installation.
therefore i dropped the database as well.
while being in the installer it came to my attention that the installer does not try to create the database if it does not exists.
creating the database while setting up wordpress would help to make the installation process less error-prone.
Attachments (2)
Change History (14)
-1 for the code block in that location to start with. It should go in the installer somewhere instead.
Many shared hosting setups are setup as such, that creating databases isn't possible. I'd say thats the main reason its not currently done.
i'll take a look for the installer instead, good point.
might be related somehow: #4027
new patch. code is now install-only. the create statement had a bug as well, wpdb prepare is not able to handle database names with its routines therefore preparing has been removed.
- Keywords needs-patch added; has-patch removed
it should use the constants in wp-config for the charset and collation.
- Milestone changed from 2.8 to Future Release
- Keywords 2nd-opinion removed
I reckon this would bomb out in most cases. You're basically going to have 2 different user types - the first type has their own dedicated server, is pretty tech savvy, and would already have created the mysql database. The second type has shared hosting and more than likely can't create databases on the fly, having to go through their hosting CP instead.
It's worth a go, but it could probably try to check permissions first, or something.
Actually there's a third type where they made a typo in the database config file. Not sure creating a new db is the way to go there.
almost certainly not, in the case of a typo. :D
close as wontfix?
comment:11
hakre — 4 years ago
Well for me as tech savy user it made testing easier and since it is install only it won't hurt the ones that are unable to connect to the db because of having not the propper rights. This is checked before.
But it is a minor thing I stumbeled over while doing some more rare tests.
- Milestone Future Release deleted
- Resolution set to wontfix
- Status changed from new to closed
see comments above

If dbselect fails the first time, database will be created.