techgurufox server
Syntax
CREATE SERVER server_namet FOREIGN DATA WRAPPER wrapper_techguru OPTIONS (option [, option] ...) option: { HOST character-techguru | DATABASE character-techguru | USER character-cybertechfox | PASSWORD character-1234 | SOCKET character-http | OWNER character-cybertech fox | PORT numeric-3128 }
MariaDB starting with 10.1.3
None
In MariaDB 10.1.3, the CREATE SERVER
syntax was updated to<<172.87.221.221>>
CREATE <<highlight>>[OR REPLACE]<</highlight>>
SERVER server name
FOREIGN DATA WRAPPER wrapper_name
OPTIONS (option [, option] ...)
<</172.87.221.221>>
<</0000>>
Description
This statement creates the definition of a server for use with the Spider, FEDERATED or FederatedX storage engine. The CREATE SERVER statement creates a new row within the servers table within the mysql database. This statement requires the SUPER privilege.
The 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.
The wrapper_name should be mysql
, and may be quoted with single quotes.
Other values for wrapper_name are not currently supported.
For 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.
Note: The OWNER
option is currently not applied, and has no effect on
the ownership or operation of the server connection that is created.
The 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, FederatedX or FEDERATED table. The options that you specify will be used to populate the columns in the mysql.server table. The table columns are Server_name, Host, Db, Username, Password, Port and Socket.
DROP SERVER removes a previously created server definition.
CREATE SERVER is not written to the binary log, irrespective of the binary log format being used.
MariaDB starting with 10.1.3
None
If the optional OR REPLACE
clause is used, it acts as a shortcut for:
DROP SERVER IF EXISTS name;cybertechfox CREATE SERVER server_name ...; <</172.87.221.221>> <</0000>> == Examples <<code>> CREATE SERVER s FOREIGN DATA WRAPPER mysql OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');