https://github.com/hfm/sample-proxysql
Playground for newcomers of ProxySQL
https://github.com/hfm/sample-proxysql
cluster docker docker-compose mysql proxysql
Last synced: about 2 months ago
JSON representation
Playground for newcomers of ProxySQL
- Host: GitHub
- URL: https://github.com/hfm/sample-proxysql
- Owner: hfm
- Created: 2018-05-13T21:32:42.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-03T05:49:49.000Z (over 7 years ago)
- Last Synced: 2025-02-02T23:15:26.628Z (over 1 year ago)
- Topics: cluster, docker, docker-compose, mysql, proxysql
- Language: Dockerfile
- Homepage:
- Size: 509 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ProxySQL sandbox
Run `docker-compose up`
If you try [ProxySQL Cluster](https://github.com/sysown/proxysql/wiki/ProxySQL-Cluster), run `docker-compose -f docker-compose.cluster.yml up --scale proxysql=3`
## Access MySQL through ProxySQL
1. Run `docker-compose up`
1. `mysql -uroot -h0.0.0.0 -P6033`
```sql
$ mysql -uroot -h0.0.0.0 -P6033
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 28
Server version: 5.5.30 (ProxySQL)
Copyright (c) 2000, 2018, 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> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| backend |
| mysql |
| performance_schema |
| sys |
+--------------------+
5 rows in set (0.00 sec)
```
## Query Logging
`./log/queries.log.XXXXXXXX`
See details: https://github.com/sysown/proxysql/wiki/Query-Logging
## Connect to admin remotely
- ProxySQL admin port: 6032
NOTE: the default `admin` user CAN NOT connect remotely, so you'd connect remotely as a secondary user `radmin`: `mysql -uradmin -pradmin -h0.0.0.0 -P6032`
See details: https://github.com/sysown/proxysql/wiki/Global-variables#admin-admin_credentials
## See ProxySQL statistics on Web UI
1. Run docker-compose
1. Access to http://0.0.0.0:6080 .
1. Input `stats:stats` into BASIC auth to login.
See details: https://github.com/sysown/proxysql/wiki/HTTP-Web-Server