Comments (2)
补充说明一下:
1.使用的go 1.16编译,centos 7系统yum直接安装的
2.只是sys.log报错,不影响使用,因为只有一台机器,所以不清楚这样的话,从库会不会被判断成down
以下为配置文件:
# kingshard的地址和端口
addr : 0.0.0.0:9696
# prometheus server listen addr
prometheus_addr : 127.0.0.1:7080
# 连接kingshard的用户名和密码的用户列表
user_list:
-
user : kingshard
password : 111111
# the web api server
web_addr : 127.0.0.1:9797
#HTTP Basic Auth
web_user : admin
web_password : admin
# if set log_path, the sql log will write into log_path/sql.log,the system log
# will write into log_path/sys.log
log_path : /root/kingshard
# log level[debug|info|warn|error],default error
log_level : debug
# 打开SQL日志,设置为on;关闭SQL日志,设置为off
log_sql: on
# 如果设置了该项,则只输出SQL执行时间超过slow_log_time(ms)毫秒的SQL日志,不设置则输出全部SQL日志
slow_log_time : 100
# sql黑名单文件路径
# 所有在该文件中的sql都会被kingshard拒绝转发
#blacklist_sql_file: /Users/flike/blacklist
# 只允许下面的IP列表连接kingshard,如果不配置则对连接kingshard的IP不做限制
# allow_ips : 127.0.0.1
# kingshard使用的字符集,如果不设置该选项,则kingshard使用utf8作为默认字符集
proxy_charset: utf8mb4
# 一个node节点表示mysql集群的一个数据分片,包括一主多从(可以不配置从库)
nodes :
-
name : node1
# 连接池中最大的空闲连接数,也就是kingshard最多与后端DB建立max_conns_limit个连接
max_conns_limit : 64
# kingshard连接该node中mysql的用户名和密码,master和slave的用户名和密码必须一致
user : root
password : 1111
# master的地址和端口
master : 127.0.0.1:3306
# slave的地址、端口和读权重,@后面的表示该slave的读权重。可不配置slave
# read load weight of this slave.
#slave : 127.0.0.1:3309@1,192.168.0.13@2
# kingshard在300秒内都连接不上mysql,kingshard则会下线该mysql
#down_after_noalive : 32
# 各用户的分表规则
schema_list :
-
# schema的所属用户名
user: kingshard
# 分表分布的node名字
nodes: [node1]
#
default: node1
shard:
-
from kingshard.
已查明,此问题是因为interactive_timeout和wait_timeout设置引起的.
这两个值有任一个设置小于20,就会出现此报错.但不影响使用.
必须两个同时设置20以上才行.之后就不会再报错了.
有哪个有经验的大哥说一下,这两个值在有mysql proxy时应该设多少合适?
from kingshard.
Related Issues (20)
- 能支持下按range分库分表和按时间分库分表么
- sqlparser 不支持 binary方法
- kingshard支持2张以上的表关联吗?
- this maybe append nil db to n.Slave[]
- error
- 单独的select * from table_xxx for update 语句应该配置一个选项来决定是否走主库查询
- 求一个完整的Dockerfile HOT 1
- 请问各位 分库分表情况下 这种SQL语句能执行吗
- 还维护吗?好久没更新了 HOT 2
- 读区mysql package递归替换迭代是否更优
- 请问节点和子表的对应关系可以配置吗
- hash方式分表分库分表时,如果key 是一个int64的值,只会达到第一个节点的第一个表上,请问这个该怎么修改 HOT 1
- timeout设置问题.
- 4年不更新了 HOT 1
- 这个好像好久不更新了 HOT 2
- When does kingshard support mysql8.0? My company now uses mysql8.0. HOT 1
- kingshard QQ群还活跃吗? HOT 1
- 谁能把这项目救活?
- 在用kingshard的活跃用户在这里登记一下吧,咱们一起交流交流 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kingshard.