CREATE SERVERserver_nameFOREIGN DATA WRAPPERwrapper_nameOPTIONS (option[,option] ...)option: { HOSTcharacter-literal| DATABASEcharacter-literal| USERcharacter-literal| PASSWORDcharacter-literal| SOCKETcharacter-literal| OWNERcharacter-literal| PORTnumeric-literal}
      This statement creates the definition of a server for use with the
      FEDERATED 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_nameserver_name
      The wrapper_namemysql, and may be quoted with single
      quotes. Other values for
      wrapper_name
      For each option
        Note that 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.server table that can
      later be used with the CREATE TABLE
      statement when creating a 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.
    
For example:
CREATE SERVER s FOREIGN DATA WRAPPER mysql OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test');
      The data stored in the table can be used when creating a
      connection to a FEDERATED table:
    
CREATE TABLE t (s1 INT) ENGINE=FEDERATED CONNECTION='s';
      For more information, see
      Section 13.10, “The FEDERATED Storage Engine”.
    
      CREATE SERVER does not cause an
      automatic commit.
    
      CREATE SERVER was added in MySQL
      5.1.15.
    


User Comments
Add your own comment.