1.废话不多说。详细使用请查看官方文档,本文主要记录的是cetus的安装心得
https://github.com/Lede-Inc/cetus/blob/master/doc/cetus-rw-admin.md
1.user.json需要注意的地方
2.proy.conf需要注意的地方
测试应用端
读写分离测试通过,过程懒得写了!
后台管理
https://github.com/Lede-Inc/cetus/blob/master/doc/cetus-rw-admin.md
1.user.json需要注意的地方
-
[root@iZ2ze66bhrbxkc31nljgjnZ cetus_rw]# more conf/users.json
-
{
-
"users": [{
-
"user": "appuser1", ----应用用户
-
"client_pwd": "123", ----client用户
-
"server_pwd": "ESBecs00" ----链接mysql数据库的用户
-
}, {
-
"user": "devuser",
-
"client_pwd": "123",
-
"server_pwd": "ESBecs00"
-
}]
- }
2.proy.conf需要注意的地方
-
[root@iZ2ze66bhrbxkc31nljgjnZ cetus_rw]# more conf/proxy.conf
-
[cetus]
-
daemon = true
-
-
# Loaded Plugins
-
plugins=proxy,admin
-
-
# Proxy Configuration
-
proxy-address=127.0.0.1:1234 ----proxy端口,
-
proxy-backend-addresses=47.93.243.162:3306
-
proxy-read-only-backend-addresses=47.93.243.162:3308 ---mysql后端
-
-
# Admin Configuration
-
admin-address=127.0.0.1:5678 -----管理端口
-
admin-username=admin
-
admin-password=admin
-
-
# Backend Configuration
-
default-db=test
-
default-username=appuser1 -----默认用户(必须是user里面的)
-
-
# File and Log Configuration
-
log-file=cetus.log
- log-level=debug
测试应用端
-
[root@iZ2ze66bhrbxkc31nljgjnZ ~]# mysql -uappuser1 -p123 -P1234 -h127.0.0.1 devops
-
Warning: Using a password on the command line interface can be insecure.
-
-
-
mysql> select database();
-
+------------+
-
| database() |
-
+------------+
-
| devops |
-
+------------+
-
1 row in set (0.01 sec)
-
-
mysql> quit
-
Bye
-
[root@iZ2ze66bhrbxkc31nljgjnZ ~]# mysql -udevuser -p123 -P1234 -h127.0.0.1 devops
-
Warning: Using a password on the command line
-
- mysql>
读写分离测试通过,过程懒得写了!
-
[root@iZ2ze66bhrbxkc31nljgjnZ ~]# mysql -uadmin -padmin -P5678 -h127.0.0.1
-
Warning: Using a password on the command line interface can be insecure.
-
Welcome to the MySQL monitor. Commands end with ; or \g.
-
Your MySQL connection id is 1
-
Server version: cetus 0.8.8 admin
-
-
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
-
-
Oracle is a registered trademark of Oracle Corporation and/or its
-
affiliates. Other names may be trademarks of their respective
-
owners.
-
-
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
-
-
mysql> SELECT * FROM backends;
-
+-------------+--------------------+-------+------+-------------+------+------------+------------+-------------+
-
| backend_ndx | address | state | type | slave delay | uuid | idle_conns | used_conns | total_conns |
-
+-------------+--------------------+-------+------+-------------+------+------------+------------+-------------+
-
| 1 | 47.93.243.162:3306 | up | rw | NULL | NULL | 2 | 0 | 2 |
-
| 2 | 47.93.243.162:3308 | up | ro | 0 | NULL | 2 | 0 | 2 |
-
+-------------+--------------------+-------+------+-------------+------+------------+------------+-------------+
- 2 rows in set (0.00 sec)
连接cetus中间件Hang住怎么办
https://mp.weixin.qq.com/s/KC0ucH-w5kr3tR5IgUiOAw来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29096438/viewspace-2152221/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29096438/viewspace-2152221/
202

被折叠的 条评论
为什么被折叠?



