Replace SLAVE with REPLICA
Summary: Since MySQL 8.0, the term slave was replaced with replica due to terminology. This patch elevates the minimum MySQL version to 8.0. Test Plan: Test the latest (9.3 for now) and LTS versions (8.0 and 8.4). Reviewers: O1 Blessed Committers, avivey, mainframe98 Reviewed By: O1 Blessed Committers, avivey, mainframe98 Subscribers: aklapper, mainframe98, avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T16107 Differential Revision: https://we.phorge.it/D26081
This commit is contained in:
parent
6bcc10fbf1
commit
be6a3542a9
|
@ -173,7 +173,7 @@ final class PhabricatorDatabaseSetupCheck extends PhabricatorSetupCheck {
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: It's possible that replication is broken but we have not been
|
// NOTE: It's possible that replication is broken but we have not been
|
||||||
// granted permission to "SHOW SLAVE STATUS" so we can't figure it out.
|
// granted permission to "SHOW REPLICA STATUS" so we can't figure it out.
|
||||||
// We allow this kind of configuration and survive these checks, trusting
|
// We allow this kind of configuration and survive these checks, trusting
|
||||||
// that operations knows what they're doing. This issue is shown on the
|
// that operations knows what they're doing. This issue is shown on the
|
||||||
// "Database Servers" console.
|
// "Database Servers" console.
|
||||||
|
|
|
@ -143,7 +143,7 @@ should //not// be replicating from another database.
|
||||||
|
|
||||||
To report this status, the user Phorge is connecting as must have the
|
To report this status, the user Phorge is connecting as must have the
|
||||||
`REPLICATION CLIENT` privilege (or the `SUPER` privilege) so it can run the
|
`REPLICATION CLIENT` privilege (or the `SUPER` privilege) so it can run the
|
||||||
`SHOW SLAVE STATUS` command. The `REPLICATION CLIENT` privilege only enables
|
`SHOW REPLICA STATUS` command. The `REPLICATION CLIENT` privilege only enables
|
||||||
the user to run diagnostic commands so it should be reasonable to grant it in
|
the user to run diagnostic commands so it should be reasonable to grant it in
|
||||||
most cases, but it is not required. If you choose not to grant it, this page
|
most cases, but it is not required. If you choose not to grant it, this page
|
||||||
can not show any useful diagnostic information about replication status but
|
can not show any useful diagnostic information about replication status but
|
||||||
|
|
|
@ -77,7 +77,7 @@ Beyond an operating system, you will need **a webserver**.
|
||||||
|
|
||||||
You will also need:
|
You will also need:
|
||||||
|
|
||||||
- **MySQL**: You need MySQL. We strongly recommend MySQL 5.5 or newer.
|
- **MySQL**: You need MySQL. The required version is MySQL 8.0 or newer.
|
||||||
You will need a server with multiple databases.
|
You will need a server with multiple databases.
|
||||||
- **PHP**: You need a PHP engine:
|
- **PHP**: You need a PHP engine:
|
||||||
- PHP 7 - 7.2.25 or newer.
|
- PHP 7 - 7.2.25 or newer.
|
||||||
|
|
|
@ -346,13 +346,13 @@ final class PhabricatorDatabaseRef
|
||||||
$t_start = microtime(true);
|
$t_start = microtime(true);
|
||||||
$replica_status = false;
|
$replica_status = false;
|
||||||
try {
|
try {
|
||||||
$replica_status = queryfx_one($conn, 'SHOW SLAVE STATUS');
|
$replica_status = queryfx_one($conn, 'SHOW REPLICA STATUS');
|
||||||
$ref->setConnectionStatus(self::STATUS_OKAY);
|
$ref->setConnectionStatus(self::STATUS_OKAY);
|
||||||
} catch (AphrontAccessDeniedQueryException $ex) {
|
} catch (AphrontAccessDeniedQueryException $ex) {
|
||||||
$ref->setConnectionStatus(self::STATUS_REPLICATION_CLIENT);
|
$ref->setConnectionStatus(self::STATUS_REPLICATION_CLIENT);
|
||||||
$ref->setConnectionMessage(
|
$ref->setConnectionMessage(
|
||||||
pht(
|
pht(
|
||||||
'No permission to run "SHOW SLAVE STATUS". Grant this user '.
|
'No permission to run "SHOW REPLICA STATUS". Grant this user '.
|
||||||
'"REPLICATION CLIENT" permission to allow this server to '.
|
'"REPLICATION CLIENT" permission to allow this server to '.
|
||||||
'monitor replica health.'));
|
'monitor replica health.'));
|
||||||
} catch (AphrontInvalidCredentialsQueryException $ex) {
|
} catch (AphrontInvalidCredentialsQueryException $ex) {
|
||||||
|
@ -386,7 +386,7 @@ final class PhabricatorDatabaseRef
|
||||||
$ref->setReplicaMessage(
|
$ref->setReplicaMessage(
|
||||||
pht(
|
pht(
|
||||||
'This host has a "replica" role, but is not replicating data '.
|
'This host has a "replica" role, but is not replicating data '.
|
||||||
'from a master (no output from "SHOW SLAVE STATUS").'));
|
'from a master (no output from "SHOW REPLICA STATUS").'));
|
||||||
} else {
|
} else {
|
||||||
$ref->setReplicaStatus(self::REPLICATION_OKAY);
|
$ref->setReplicaStatus(self::REPLICATION_OKAY);
|
||||||
}
|
}
|
||||||
|
|
|
@ -347,7 +347,7 @@ abstract class AphrontBaseMySQLDatabaseConnection
|
||||||
case 1044: // Access denied to database
|
case 1044: // Access denied to database
|
||||||
case 1142: // Access denied to table
|
case 1142: // Access denied to table
|
||||||
case 1143: // Access denied to column
|
case 1143: // Access denied to column
|
||||||
case 1227: // Access denied (e.g., no SUPER for SHOW SLAVE STATUS).
|
case 1227: // Access denied (e.g., no SUPER for SHOW REPLICA STATUS).
|
||||||
|
|
||||||
// See T13622. Try to help users figure out that this is a GRANT
|
// See T13622. Try to help users figure out that this is a GRANT
|
||||||
// problem.
|
// problem.
|
||||||
|
|
Loading…
Reference in a new issue