龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 数据库类 > MySQL 技术 >

MySQL中使用FREDATED引擎实现跨数据库服务器、跨实例访问(2)

时间:2014-11-01 02:35来源:网络整理 作者:网络 点击:
分享到:
复制代码 代码如下: scheme://user_name[:password]@host_name[:port_num]/db_name/tbl_name scheme: A recognized connection protocol. Only mysql is supported as the scheme value at this point. user

复制代码 代码如下:

scheme://user_name[:password]@host_name[:port_num]/db_name/tbl_name
    scheme: A recognized connection protocol. Only mysql is supported as the scheme value at this point.
    user_name: The user name for the connection. This user must have been created on the remote server, and must have suitable privileges to perform the required actions (SELECT, INSERT,UPDATE, and so forth) on the remote table.
    password: (Optional) The corresponding password for user_name.
    host_name: The host name or IP address of the remote server.
    port_num: (Optional) The port number for the remote server. The default is 3306.
    db_name: The name of the database holding the remote table.
    tbl_name: The name of the remote table. The name of the local and the remote table do not have to match.
链接示例样本:
    CONNECTION='mysql://username:password@hostname:port/database/tablename'
    CONNECTION='mysql://username@hostname/database/tablename'
    CONNECTION='mysql://username:password@hostname/database/tablename'

精彩图集

赞助商链接