[wp-trac] [WordPress Trac] #63678: WordPress redirect to wp-admin/install.php when a user is rate limited in mysql
WordPress Trac
noreply at wordpress.org
Wed Jul 30 09:00:35 UTC 2025
#63678: WordPress redirect to wp-admin/install.php when a user is rate limited in
mysql
-----------------------------------+------------------------------
Reporter: anonymooo | Owner: anonymooo
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Database | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion | Focuses:
-----------------------------------+------------------------------
Comment (by anonymooo):
Replying to [comment:7 jorbin]:
> Thanks @anonymooo.
>
> While I fully agree that the experience here shouldn't be to redirect
but to error out, I wonder if it should be more a more generic error so
that 1) other error codes can also error out. Perhaps all the 1xxx? 2) If
it should rely on `$this->last_errror` rather than creating a new string.
>
> My thinking with using the string from mysql is that since the problem
here is on the mysql server side, the error message provides a better
starting place for people to search for a solution.
>
> For anyone looking for the list of error codes,
[https://dev.mysql.com/doc/mysql-errors/8.4/en/server-error-reference.html
here are all the server ones] and from there you can view the others as
well.
Hi,
While I agree that errors should be treated in a generic way i.e. catch
the error message and display it to help finding the solution (This could
even be a setting like "display or not the error message", as some people
may prefer hiding the error to visitors and have it in logs or whatever)
Most MySQL errors are properly managed already. This one is a bit specific
as it is not really an error, everything works well but the MySQL server
refuses to answer anymore, and for a limited duration only.
Moreover, in many cases the retry is useful (A timeout in connection, a
database server failover, …). In that case, the retry mechanism makes the
server refuse to answer for a longer period of time, that's why this error
should be treated differently, and trigger the wp_die as soon as possible.
Also, having the error message rely on `$this->last_error` gives all the
required information to fix the problem (database username, setting to
change) without having to parse the error message just to rewrite it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63678#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list