Server System Variables Dropping the primary key fails even if the table also contains a  UNIQUE NOT NULL  index. The  REQUIRE_TABLE_PRIMARY_KEY_CHECK  option of the  CHANGE REPLICATION SOURCE TO  statement (from MySQL 8.0.23) or  CHANGE MASTER TO  statement (before MySQL 8.0.23) enables a replica to select its own policy for primary key checks. When the option is set to  ON  for a replication channel, the replica always uses the value  ON  for the  sql_require_primary_key system variable in replication operations, requiring a primary key. When the option is set to  OFF , the replica always uses the value  OFF  for the  sql_require_primary_key  system variable in replication operations, so that a primary key is never required, even if the source required one. When the  REQUIRE_TABLE_PRIMARY_KEY_CHECK  option is set to  STREAM , which is the default, the replica uses whatever value is replicated from the source for each transaction. With the  STREAM  setting for the  REQUIRE_TABLE_PRIMARY_KEY_CHECK  option, if privilege checks are in use for the replication channel, the  PRIVILEGE_CHECKS_USER  account needs privileges sufficient to set restricted session variables, so that it can set the session value for the  sql_require_primary_key  system variable. With the  ON  or  OFF  settings, the account does not need these privileges. For more information, see Section 17.3.3, “Replication Privilege Checks” . If this variable is enabled,  UPDATE  and  DELETE  statements that do not use a key in the  WHERE  clause or a  LIMIT  clause produce an error. This makes it possible to catch  UPDATE  and  DELETE  statements where keys are not used properly and that would probably change or delete a large number of rows. The default value is  OFF . For the  mysql  client,  sql_safe_updates  can be enabled by using the  --safe-updates  option. For more information, see Using Safe-Updates Mode (--safe-updates). 889 • sql_select_limit • sql_safe_updates •Attempts to import a table with no primary key fail with an error. •Attempts to drop the primary key from an existing table fail with an error, with the exception that dropping the primary key and adding a primary key in the same  ALTER TABLE  statement is permitted. System Variable sql_safe_updates Scope Global, Session Dynamic Yes SET_VAR  Hint Applies Yes Type Boolean Default Value OFF System Variable sql_select_limit Scope Global, Session Dynamic Yes SET_VAR  Hint Applies Yes