遠端的表在federated資料庫中並且被如下定義:
create table test_table (
id int(20) not null auto_increment,
name varchar(32) not null default '',
other int(20) not null default '0',
primary key (id),
key name (name),
key other_key (other)
)engine=myisam
default charset=latin1;
create table federated_table (
id int(20) not null auto_increment,
name varchar(32) not null default '',
other int(20) not null default '0',
primary key (id),
key name (name),
key other_key (other)
)engine=federated
default charset=latin1
connection='mysql://root@remote_host:9306/federated/test_table';
在connection選項中的連線字串的一般形式如下:
scheme://user_name[:password]@host_name[:port_num]/db_name/tbl_name
只有mysql在這一點被支援為scheme,密碼和埠號時可選的。
這裡有一些連線字串的例子:
connection='mysql://username:password@hostname:port/database/tablename'
connection='mysql://username@hostname/database/tablename'
connection='mysql://username:password@hostname/database/tablename'
mysql遠端表 MySQL遠端表訪問設定
遠端的表在federated資料庫中並且被如下定義 create table test table id int 20 not null auto increment,name varchar 32 not null default other int 20 not null default 0 p...
MySQL遠端表訪問設定
mysql遠端表訪問設定 本博文 自 官網上的資訊 使用mysql federated儲存引擎,沒有對錶的本地資料檔案 比如,沒有.myd檔案 取而代之地,乙個遠端資料庫儲存那些正常地應該在表中的資料。這使得mysql客戶端api來讀,刪除,更新和插入資料的使用成為必要。資料取回被通過select ...
MySQL 設定遠端訪問
mysql遠端訪問,也就是通過ip訪問mysql服務,mysql對於安全的要求是非常嚴格的,需要授權。1.本地訪問 sql grantallprivilegeson toadmin localhost identifiedby admin withgrantoption flushprivilege...