Syntax\n------\n\nCREATE [OR REPLACE] SERVER [IF NOT EXISTS] server_name\n    FOREIGN DATA WRAPPER wrapper_name\n    OPTIONS (option [, option] ...)\n\noption: <= MariaDB 11.6\n  { HOST character-literal\n  | DATABASE character-literal\n  | USER character-literal\n  | PASSWORD character-literal\n  | SOCKET character-literal\n  | OWNER character-literal\n  | PORT numeric-literal }\n\noption: >= MariaDB Enterprise Server 11.4 / Community Server 11.7\n  { HOST character-literal\n  | DATABASE character-literal\n  | USER character-literal\n  | PASSWORD character-literal\n  | SOCKET character-literal\n  | OWNER character-literal\n  | PORT numeric-literal\n  | PORT quoted-numerical-literal\n  | identifier character-literal}\n\nDescription\n-----------\n\nThis statement creates the definition of a server for use with the Spider, Connect, FEDERATED, or FederatedX storage engine. The CREATE SERVER statement creates a new row in the servers table within the mysql database. This statement requires the FEDERATED ADMIN privilege.\n\nThis statement creates the definition of a server for use with the Spider, Connect, FEDERATED, or FederatedX storage engine. The CREATE SERVER statement creates a new row in the servers table within the mysql database. This statement requires the SUPER privilege.\n\nThe server_name should be a unique reference to the server. Server definitions are global within the scope of the server, it is not possible to qualify the server definition to a specific database. server_name has a maximum length of 64 characters (names longer than 64 characters are silently truncated), and is case-insensitive. You may specify the name as a quoted string.\n\nThe wrapper_name may be quoted with single quotes. Supported values are:\n\n mysql\n mariadb&#x20;\n\nFor each option you must specify either a character literal or numeric literal. Character literals are UTF-8, support a maximum length of 64 characters and default to a blank (empty) string. String literals are silently truncated to 64 characters. Numeric literals must be a number between 0 and 9999, default value is 0.\n\nNote: The OWNER option is currently not applied, and has no effect on the ownership or operation of the server connection that is created.\n\nThe CREATE SERVER statement creates an entry in the mysql.servers table that can later be used with the CREATE TABLE statement when creating a Spider, Connect, FederatedX or FEDERATED table. The options that you specify will be used to populate the columns in the mysql.servers table. The table columns are Server_name, Host, Db, Username, Password, Port, and Socket.\n\nNote: When used with the Spider storage engine, connection information provided via CREATE SERVER may be overridden by table-level or engine-defined parameters. For information on connection configuration and precedence rules, see the Spider Storage Engine Core Concepts page.\n\nDROP SERVER removes a previously created server definition.\n\nCREATE SERVER is not written to the binary log, irrespective of the binary log format being used and therefore will not replicate.\n\nGalera replicates the CREATE SERVER, ALTER SERVER and DROP SERVER statements.\n\nGalera does not replicate the CREATE SERVER, ALTER SERVER and DROP SERVER statements.\n\nFor valid identifiers to use as server names, see Identifier Names.\n\nThe SHOW CREATE SERVER statement can be used to show the CREATE SERVER statement that created a given server definition.\n\nThe SHOW CREATE SERVER statement cannot be used to show the CREATE SERVER statement that created a given server definition.\n\nOR REPLACE\n\nIf the optional OR REPLACE clause is used, it acts as a shortcut for:\n\n``sql\nDROP SERVER IF EXISTS name;\nCREATE SERVER server_name ...;\n`\n\nIF NOT EXISTS\n\nIf the IF NOT EXISTS clause is used, MariaDB will return a warning instead of an error if the server already exists. Cannot be used together with OR REPLACE`.\n\nExamples\n--------\n\nCREATE SERVER s\nFOREIGN DATA WRAPPER mariadb\nOPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/data-definition/create/create-server