clickhouse使用問題記錄
mysql引擎
create table t_mysql
(
id Int32,
name String,
) engine = MySQL('127.0.0.1:3306', 'test', 't', 'root', '123456');
mysql进行ddl:
alter table t modify name int ,add age tinyint;
mysql添加、修改mysql字段时,ch无法生效,需要重建,群里有人说重启可以,我测试重启没有生效
mysql同步到ch限制
CREATE DATABASE t_mysql ENGINE = MaterializeMySQL('127.0.0.1:3306', 'db', 'root', '123456');
库创建后,ch先全量,再做为mysql的从库实时时同步mysql数据,但有一些限制:
-
mysql5.6及以下版不支持
-
ch版本太低也不支持,至少20.9以上
-
mysql参数(binlog为row,开启gtid)
binlog_format = row gtid-mode = on enforce-gtid-consistency =1 log-slave-updates = true # mysql从库 default_authentication_plugin='mysql_native_password' # 8.0默认caching_sha2_password
-
库中如果有无主键的表,会初始化失败
-
不支持like (creat table t1 like t;)
Code: 48. DB::Exception: Received from 192.x.x.x:9000. DB::Exception: Cannot convert create like statement to ClickHouse SQL: While executing MYSQL_QUERY_EVENT. The query: create table t_1 like t
點(diǎn)擊查看更多內(nèi)容
為 TA 點(diǎn)贊
評(píng)論
評(píng)論
共同學(xué)習(xí),寫下你的評(píng)論
評(píng)論加載中...
作者其他優(yōu)質(zhì)文章
正在加載中
感謝您的支持,我會(huì)繼續(xù)努力的~
掃碼打賞,你說(shuō)多少就多少
贊賞金額會(huì)直接到老師賬戶
支付方式
打開微信掃一掃,即可進(jìn)行掃碼打賞哦