时间:2021-07-01 10:21:17 帮助过:3人阅读
[mysqld] datadir=/var/lib/mysql/ socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 log-bin=mysql-bin server-id = 2 auto_increment_offset=2 auto_increment_increment=2 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid master-connect-retry=60 replicate-do-db =allslave my.cnf
wget wget https://downloads.mariadb.com/archives/mysql-proxy/mysql-proxy-0.8.3-linux-glibc2.3-x86-64bit.tar.gz useradd -r mysql-proxy tar zxvf mysql-proxy-0.8.3-linux-glibc2.3-x86-64bit.tar.gz -C /usr/local mv /usr/local/mysql-proxy-0.8.3-linux-glibc2.3-x86-64bit /usr/local/mysql-proxy
export PATH=$PATH:/usr/local/mysql-proxy/bin/ echo "PATH=$PATH:/usr/local/mysql-proxy/bin"
Mysql-proxy的相关参数如下: --help-all :获取全部帮助信息; --proxy-address=host:port :代理服务监听的地址和端口; --admin-address=host:port :管理模块监听的地址和端口; --proxy-backend-addresses=host:port :后端mysql服务器的地址和端口; --proxy-read-only-backend-addresses=host:port :后端只读mysql服务器的地址和端口; --proxy-lua-script=file_name :完成mysql代理功能的Lua脚本; --daemon :以守护进程模式启动mysql-proxy; --keepalive :在mysql-proxy崩溃时尝试重启之; --log-file=/path/to/log_file_name :日志文件名称; --log-level=level :日志级别; --log-use-syslog :基于syslog记录日志; --plugins=plugin:在mysql-proxy启动时加载的插件; --user=user_name :运行mysql-proxy进程的用户; --defaults-file=/path/to/conf_file_name : 默认使用的配置文件路径;其配置段使用[mysql-proxy]标识; --proxy-skip-profiling : 禁用profile; --pid-file=/path/to/pid_file_name :进程文件名;
mysql-proxy --daemon --log-level=debug --user=mysql-proxy --keepalive --log-file=/var/log/mysql-proxy.log --plugins="proxy" --proxy-backend-addresses="192.168.1.14:3306" --proxy-read-only-backend-addresses="192.168.1.15:3306" --proxy-lua-script="/usr/local/mysql-proxy/share/doc/mysql-proxy/rw-splitting.lua" --plugins=admin --admin-username="admin" --admin-password="admin" --admin-lua-script="/usr/local/mysql-proxy/lib/mysql-proxy/lua/admin.lua"
netstat -ntpl |grep mysql-proxy mysql -h192.168.1.14 -uadmin -p -P4041 select * from backends;
问题:
VIP怎么产生的?
mysql抄书6:MySQL读写分离
标签:/usr 运行 问题: slave .com pass tin isp syslog