All Products
Search
Document Center

PolarDB:Compatibility with MySQL

Last Updated:Mar 28, 2026

PolarDB-X is a distributed database service compatible with MySQL syntax. It comes in two editions: Standard Edition (centralized) and Enterprise Edition (distributed). Both editions support MySQL SQL syntax, but each has a different compatibility profile based on its architecture.

  • Standard Edition is 100% compatible with MySQL syntax. It blocks certain control-type SQL statements for security reasons — these statements are syntactically accepted but denied at execution time.

  • Enterprise Edition is compatible with MySQL syntax but does not fully support some advanced MySQL features. These limitations stem from the complexity of the distributed architecture. Unsupported statements are parsed without error to maintain compatibility with upstream and downstream tools, but they do not execute.

Use this page to identify compatibility gaps before migrating from a traditional MySQL database to a PolarDB-X instance.

Standard Edition

Unsupported statements at a glance

The following statements are syntactically accepted but blocked at execution time. This is a security policy, not an architectural limitation.

Control statements (disallowed):

  • ALTER EVENT, ALTER INSTANCE, ALTER SERVER, ALTER TABLESPACE

  • CREATE SERVER, CREATE SPATIAL REFERENCE SYSTEM, CREATE TABLESPACE

  • DROP SERVER, DROP SPATIAL REFERENCE SYSTEM

  • IMPORT TABLE, LOAD DATA, LOAD XML

  • CHANGE MASTER TO, CHANGE REPLICATION FILTER, CHANGE REPLICATION SOURCE TO

  • START REPLICA, START SLAVE, STOP REPLICA, STOP SLAVE

  • START GROUP_REPLICATION, STOP GROUP_REPLICATION

  • LOCK INSTANCE FOR BACKUP, UNLOCK INSTANCE

Not supported:

  • INTERSECT clause

SQL compatibility table

Note

PolarDB-X Standard Edition is 100% compatible with MySQL syntax. To enhance security, it denies requests to execute control-type SQL statements. Statements marked Disallowed in the Remarks column are syntactically valid but blocked at execution time.

SQL statement typeSQL syntaxCompatibleRemarks
Data definition statementsALTER DATABASEY
ALTER EVENTYDisallowed
ALTER FUNCTIONY
ALTER INSTANCEYDisallowed
ALTER PROCEDUREY
ALTER SERVERYDisallowed
ALTER TABLEY
ALTER TABLESPACEYDisallowed
ALTER VIEWY
CREATE DATABASEY
CREATE EVENTY
CREATE FUNCTIONY
CREATE INDEXY
CREATE PROCEDURE / CREATE FUNCTIONY
CREATE SERVERYDisallowed
CREATE SPATIAL REFERENCE SYSTEMYDisallowed
CREATE TABLEY
CREATE TABLESPACEYDisallowed
CREATE TRIGGERY
CREATE VIEWY
DROP DATABASEY
DROP EVENTY
DROP FUNCTIONY
DROP INDEXY
DROP PROCEDURE / DROP FUNCTIONY
DROP SERVERYDisallowed
DROP SPATIAL REFERENCE SYSTEMYDisallowed
DROP TABLEY
DROP TRIGGERY
DROP VIEWY
RENAME TABLEY
TRUNCATE TABLEY
Data manipulation statementsCALLY
DELETEY
DOY
HANDLERY
IMPORT TABLEYDisallowed
INSERTY
INTERSECT clauseYThis clause is not supported.
LOAD DATAYDisallowed
LOAD XMLYDisallowed
REPLACEY
SELECTY
SubqueriesY
UPDATEY
UNION clauseY
WITH (common table expressions)Y
Transactional and locking statementsSTART TRANSACTION, COMMIT, and ROLLBACKY
SAVEPOINT, ROLLBACK TO SAVEPOINT, and RELEASE SAVEPOINTY
LOCK INSTANCE FOR BACKUP and UNLOCK INSTANCEYDisallowed
LOCK TABLES and UNLOCK TABLESY
SET TRANSACTIONY
Statements for controlling replica serversCHANGE MASTER TOYDisallowed
CHANGE REPLICATION FILTERYDisallowed
CHANGE REPLICATION SOURCE TOYDisallowed
START REPLICAYDisallowed
START SLAVEYDisallowed
STOP REPLICAYDisallowed
STOP SLAVEYDisallowed
Statements for controlling group replicationSTART GROUP_REPLICATIONYDisallowed
STOP GROUP_REPLICATIONYDisallowed
Prepared statementsPREPAREY
EXECUTEY
DEALLOCATE PREPAREY
Database administration statements: account managementALTER USERY
CREATE ROLEY
CREATE USERY
DROP ROLEY
DROP USERY
GRANTY
RENAME USERY
REVOKEY
SET DEFAULT ROLEY
SET PASSWORDY
SET ROLEY
Database administration statements: table maintenanceANALYZE TABLEY
CHECK TABLEY
CHECKSUM TABLEY
OPTIMIZE TABLEY
REPAIR TABLEY
Database administration statements: component, plugin, and loadable function statementsCREATE FUNCTION statement for loadable functionsY
DROP FUNCTION statement for loadable functionsY
INSTALL COMPONENTY
INSTALL PLUGINY
UNINSTALL COMPONENTY
UNINSTALL PLUGINY
Database administration statements: SET statementsSET syntaxY
SET CHARACTERY
SET NAMESY
Database administration statements: SHOW statementsSHOW BINARY LOGSYOnly users who have the REPLICATION CLIENT permission can execute this statement.
SHOW BINLOG EVENTSYOnly users who have the REPLICATION SLAVE permission can execute this statement.
SHOW CHARACTER SETY
SHOW COLLATIONY
SHOW COLUMNSY
SHOW CREATE DATABASEY
SHOW CREATE EVENTY
SHOW CREATE PROCEDUREY
SHOW CREATE TABLEY
SHOW CREATE TRIGGERY
SHOW CREATE USERY
SHOW CREATE VIEWY
SHOW DATABASESY
SHOW ENGINESY
SHOW ERRORSY
SHOW EVENTSY
SHOW FUNCTION CODEY
SHOW FUNCTION STATUSY
SHOW GRANTSY
SHOW INDEXY
SHOW MASTER STATUSY
SHOW OPEN TABLESY
SHOW PLUGINSY
SHOW PRIVILEGESY
SHOW PROCEDURE CODEY
SHOW PROCEDURE STATUSY
SHOW PROCESSLISTY
SHOW PROFILEY
SHOW PROFILESY
SHOW SLAVE | REPLICA STATUSY
SHOW STATUSY
SHOW TABLE STATUSY
SHOW TABLESY
SHOW TRIGGERSY
SHOW VARIABLESY
SHOW WARNINGSY
Utility statementsDESCRIBEY
EXPLAINY
HELPY
USEY

Enterprise Edition

Unsupported statements at a glance

The following statements are not supported due to the complexity of the distributed architecture. Syntax is parsed without error to preserve tool compatibility, but the statements do not execute.

Data definition statements:

  • ALTER EVENT, ALTER INSTANCE, ALTER SERVER, ALTER TABLESPACE

  • CREATE EVENT, CREATE SERVER, CREATE SPATIAL REFERENCE SYSTEM, CREATE TABLESPACE

  • DROP EVENT, DROP SERVER, DROP SPATIAL REFERENCE SYSTEM

Data manipulation statements:

  • HANDLER, IMPORT TABLE, LOAD XML

  • LOAD DATA — syntax is supported but disabled by default

Transactional and locking statements:

  • LOCK INSTANCE FOR BACKUP, UNLOCK INSTANCE

  • LOCK TABLES, UNLOCK TABLES

Statements for controlling replica servers (all unsupported):

  • CHANGE MASTER TO, CHANGE REPLICATION FILTER, CHANGE REPLICATION SOURCE TO

  • START REPLICA, START SLAVE, STOP REPLICA, STOP SLAVE

Statements for controlling group replication (all unsupported):

  • START GROUP_REPLICATION, STOP GROUP_REPLICATION

Table maintenance: REPAIR TABLE

Component and plugin management (all unsupported):

  • INSTALL COMPONENT, INSTALL PLUGIN, UNINSTALL COMPONENT, UNINSTALL PLUGIN

SHOW statements: SHOW SLAVE HOSTS | SHOW REPLICAS

SQL compatibility table

Note

PolarDB-X Enterprise Edition is compatible with MySQL. Due to the complexity of its distributed architecture, it does not support some advanced MySQL features but does support their syntax. This preserves compatibility with upstream and downstream ecosystems.

SQL statement typeSQL syntaxCompatibleRemarks
Data definition statementsALTER DATABASEY
ALTER EVENTNThis feature is not supported.
ALTER FUNCTIONY
ALTER INSTANCENThis feature is not supported.
ALTER PROCEDUREY
ALTER SERVERNThis feature is not supported.
ALTER TABLEY
ALTER TABLESPACENThis feature is not supported.
ALTER VIEWY
CREATE DATABASEY
CREATE EVENTNThis feature is not supported.
CREATE FUNCTIONY
CREATE INDEXY
CREATE PROCEDURE / CREATE FUNCTIONY
CREATE SERVERNThis feature is not supported.
CREATE SPATIAL REFERENCE SYSTEMNThis feature is not supported.
CREATE TABLEY
CREATE TABLESPACENThis feature is not supported.
CREATE TRIGGERY
CREATE VIEWY
DROP DATABASEY
DROP EVENTNThis feature is not supported.
DROP FUNCTIONY
DROP INDEXY
DROP PROCEDURE / DROP FUNCTIONY
DROP SERVERNThis feature is not supported.
DROP SPATIAL REFERENCE SYSTEMNThis feature is not supported.
DROP TABLEY
DROP TRIGGERY
DROP VIEWY
RENAME TABLEY
TRUNCATE TABLEY
Data manipulation statementsCALLY
DELETEY
DOY
EXCEPT clauseY
HANDLERNThis feature is not supported.
IMPORT TABLENThis feature is not supported.
INSERTY
INTERSECT clauseY
LOAD DATANThis feature is supported. By default, this feature is disabled.
LOAD XMLNThis feature is not supported.
REPLACEY
SELECTY
SubqueriesY
UPDATEY
UNION clauseY
WITH (common table expressions)Y
Transactional and locking statementsSTART TRANSACTION, COMMIT, and ROLLBACKY
SAVEPOINT, ROLLBACK TO SAVEPOINT, and RELEASE SAVEPOINTY
LOCK INSTANCE FOR BACKUP and UNLOCK INSTANCENThis feature is not supported.
LOCK TABLES and UNLOCK TABLESNThis feature is not supported.
SET TRANSACTIONY
Statements for controlling replica serversCHANGE MASTER TONThis feature is not supported.
CHANGE REPLICATION FILTERNThis feature is not supported.
CHANGE REPLICATION SOURCE TONThis feature is not supported.
START REPLICANThis feature is not supported.
START SLAVENThis feature is not supported.
STOP REPLICANThis feature is not supported.
STOP SLAVENThis feature is not supported.
Statements for controlling group replicationSTART GROUP_REPLICATIONNThis feature is not supported.
STOP GROUP_REPLICATIONNThis feature is not supported.
Prepared statementsPREPAREY
EXECUTEY
DEALLOCATE PREPAREY
Database administration statements: account managementALTER USERY
CREATE ROLEY
CREATE USERY
DROP ROLEY
DROP USERY
GRANTY
RENAME USERY
REVOKEY
SET DEFAULT ROLEY
SET PASSWORDY
SET ROLEY
Database administration statements: table maintenanceANALYZE TABLEY
CHECK TABLEY
CHECKSUM TABLEY
OPTIMIZE TABLEY
REPAIR TABLENThis feature is not supported.
Database administration statements: component, plugin, and loadable function statementsCREATE FUNCTION statement for loadable functionsY
DROP FUNCTION statement for loadable functionsY
INSTALL COMPONENTNThis feature is not supported.
INSTALL PLUGINNThis feature is not supported.
UNINSTALL COMPONENTNThis feature is not supported.
UNINSTALL PLUGINNThis feature is not supported.
Database administration statements: SET statementsSET syntaxY
SET CHARACTERY
SET NAMESY
Database administration statements: SHOW statementsSHOW BINARY LOGSYOnly users who have the REPLICATION CLIENT permission can execute this statement.
SHOW BINLOG EVENTSYOnly users who have the REPLICATION SLAVE permission can execute this statement.
SHOW CHARACTER SETY
SHOW COLLATIONY
SHOW COLUMNSY
SHOW CREATE DATABASEY
SHOW CREATE EVENTY
SHOW CREATE PROCEDUREY
SHOW CREATE TABLEY
SHOW CREATE TRIGGERY
SHOW CREATE USERY
SHOW CREATE VIEWY
SHOW DATABASESY
SHOW ENGINESY
SHOW ERRORSY
SHOW EVENTSY
SHOW FUNCTION CODEY
SHOW FUNCTION STATUSY
SHOW GRANTSY
SHOW INDEXY
SHOW MASTER STATUSY
SHOW OPEN TABLESY
SHOW PLUGINSY
SHOW PRIVILEGESY
SHOW PROCEDURE CODEY
SHOW PROCEDURE STATUSY
SHOW PROCESSLISTY
SHOW PROFILEY
SHOW PROFILESY
SHOW RELAYLOG EVENTSY
SHOW REPLICASY
SHOW SLAVE HOSTS | SHOW REPLICASNThis feature is not supported.
SHOW REPLICA STATUSY
SHOW SLAVE | REPLICA STATUSY
SHOW STATUSY
SHOW TABLE STATUSY
SHOW TABLESY
SHOW TRIGGERSY
SHOW VARIABLESY
SHOW WARNINGSY
Utility statementsDESCRIBEY
EXPLAINY
HELPY
USEY