Skip to content
Big-Ele edited this page Oct 27, 2017 · 7 revisions

Welcome to the ProxySQL wiki!

Table of context

目录

Installation(安装)
Service Management(服务管理)
Multi-layer configuration system(多层级配置系统)
Tables in Admin interface(系统配置表)
Scheduler(调度)
Tables in main database (config)(main库中的表)
  Runtime tables(内存中正在使用的表)
Tables in disk database (disk)(磁盘上存储的表)
Users configuration(用户配置)
Passwords management(密码管理)
Servers configuration(服务配置)
SSL configuration(SSL 配置)

FAQ

Installation

Available from https://github.com/sysown/proxysql/releases. (可从 https://github.com/sysown/proxysql/releases 获取)
Just download and use the package manager to install it.(你要做的事情就是下载系统对应的包,然后用管理器去安装它)
Ex:(Ubuntu 示例)

wget https://github.com/sysown/proxysql/releases/download/v1.4.1/proxysql_1.4.1-ubuntu16_amd64.deb
dpkg -i proxysql_1.4.1-ubuntu16_amd64.deb

Service management(服务管理)

Once the software is installed, you can use service to start or stop it.(安装完成后,你可用service命令启动或者停止服务)

Start:(启动)

service proxysql start

Stop:(停止)

service proxysql stop

Upgrade(升级)

Install the new package and restart.(安装新版本的包并重新启动)
Ex:(Ubuntu示例)

wget https://github.com/sysown/proxysql/releases/download/v1.4.1/proxysql_1.4.1-ubuntu16_amd64.deb
dpkg -i proxysql_1.4.1-ubuntu16_amd64.deb
service proxysql restart

Check version(查看当前版本)

$ proxysql --version
ProxySQL version 1.2.3, codename Truls

A debug version has _DEBUG in its version string.(如果是测试版本,那么在version后会有_DEBUG字样)
It is slower than non-debug version, but easier to debug in case of failures.(测试版本更容易查找错误,但运行效率比正常版本低)

$ proxysql --version
Main init phase0 completed in 0.000146 secs.
ProxySQL version 1.2.3_DEBUG, codename Truls

Admin Interface(管理系统入口)

login as admin(管理员登陆)

Use a mysql client and connect using standard credentials and endpoint.(如同连接MySQL server一样,使用mysql客户端登陆管理系统)
Ex:(示例命令)

vagrant@ubuntu-14:~$ mysql -u admin -padmin -h 127.0.0.1 -P6032 --prompt='Admin> '

Output:(输出结果)

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 4
Server version: 5.5.30 (ProxySQL Admin Module)

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.

Admin>

list available schemas(列出可用的库)

Admin> SHOW DATABASES;
+-----+---------+-------------------------------+
| seq | name    | file                          |
+-----+---------+-------------------------------+
| 0   | main    |                               |
| 2   | disk    | /var/lib/proxysql/proxysql.db |
| 3   | stats   |                               |
| 4   | monitor |                               |
+-----+---------+-------------------------------+
4 rows in set (0.00 sec)

Clone this wiki locally