[wp-trac] [WordPress Trac] #12671: Installer page doesn't check if MySQL tables were created successfully

WordPress Trac noreply at wordpress.org
Thu Jan 15 15:30:12 UTC 2026


#12671: Installer page doesn't check if MySQL tables were created successfully
-----------------------------+-----------------------------
 Reporter:  thedotproduct    |       Owner:  (none)
     Type:  enhancement      |      Status:  assigned
 Priority:  normal           |   Milestone:  Future Release
Component:  Upgrade/Install  |     Version:  2.9.2
 Severity:  normal           |  Resolution:
 Keywords:  needs-patch      |     Focuses:
-----------------------------+-----------------------------
Changes (by juanmaguitar):

 * keywords:  needs-patch needs-testing => needs-patch


Comment:

 == Bug Report ==

 === Description ===
 The installer reports a successful setup even when database table creation
 fails due to insufficient MySQL permissions.

 === Environment ===
 * WordPress: 6.9
 * PHP: 8.3.29
 * Server: PHP 8.3.29 Development Server (http://localhost:8080) started
 * Database: mysql 8.0.40(restricted user: no CREATE TABLE privilege)
 * Browser: Chrome 143.0.0.0
 * OS: macOS
 * Theme: n/a (fresh install)
 * MU Plugins: None
 * Plugins: None

 === Steps to Reproduce ===

 Pre-requisites for these test instructions
 * Docker installed
 * PHP CLI (`php -v` should work)
 * A MySQL client (`mysql` CLI) – optional but handy

 Start MySQL (example using Docker):
 {{{
 docker run --name wp-mysql-test \
   -e MYSQL_ROOT_PASSWORD=root \
   -e MYSQL_DATABASE=wp_test \
   -p 3306:3306 \
   -d mysql:8
 }}}
 Connect as root:
 {{{
 mysql -h 127.0.0.1 -P 3306 -u root -p
 }}}
 Create restricted DB user (no CREATE TABLE):
 {{{
 CREATE USER 'wpbroken'@'%' IDENTIFIED BY 'wpbroken';
 GRANT SELECT, INSERT, UPDATE, DELETE ON wp_test.* TO 'wpbroken'@'%';
 FLUSH PRIVILEGES;
 }}}
 Download and extract WordPress.
 {{{
 curl -LO https://wordpress.org/latest.zip
 unzip latest.zip
 cd wordpress
 }}}
 Serve locally:
 {{{
 php -S localhost:8080
 }}}
 Navigate to: `http://localhost:8080`
 Use DB credentials:
 * Database: `wp_test`
 * User: `wpbroken`
 * Pass: `wpbroken`
 * Host: `127.0.0.1`

 Complete the installation steps.

 Verify database contents:
 {{{
 SHOW TABLES FROM wp_test;
 }}}


 # Installer reports success despite missing tables.

 === Expected Results ===
 Installer should detect database errors and fail the installation.

 === Actual Results ===
 A lot of errors are displayed but after the errors a "success" message is
 displayed.

 The errors show that the MySQL user (wpbroken) does not have permission to
 create tables. As a result, every CREATE TABLE query for WordPress core
 tables (e.g., wp_users, wp_options, wp_posts, taxonomy and comment tables)
 fails with “CREATE command denied”. Because those tables were never
 created, subsequent installer queries that assume they exist (INSERT,
 SELECT, SHOW FULL COLUMNS, DELETE) fail with “Table … doesn’t exist”,
 leading to a broken/empty database despite the installer continuing.

 But after all those errors the installer displays success message even
 though no tables are created.

 {{{
 Success!
 WordPress has been installed. Thank you, and enjoy!
 }}}

 === Additional Notes ===
 * Confirm `SHOW GRANTS FOR 'wpbroken'@'%';` to verify lack of CREATE
 privileges.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/12671#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list