Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 1.12 KB

mysql-htap-proxysql-setup.md

File metadata and controls

49 lines (31 loc) · 1.12 KB

This is a tutorial to build an HTAP service based on MySQL, MyDuck Server, and ProxySQL.

Prerequisites

Launch the HTAP cluster

Go the root path of this project and run the following commands:

cd devtools/htap-setup-mysql/proxysql
docker compose up -d --wait

Then you'll get a HTAP cluster. And an account 'lol' with password 'lol' has been created for connecting. Have fun!

Connecting

The HTAP service can be accessed by

mysql -h127.0.0.1 -P16033 -ulol -plol

Monitor status

The status of ProxySQL can be checked by connecting to its admin interface:

mysql -h127.0.0.1 -P16032 -uradmin -pradmin --prompt='ProxySQL Admin> '

In the admin interface, you can check server status:

SELECT * FROM mysql_servers;
SELECT * FROM stats.stats_mysql_connection_pool;

ProxySQL will automatically route read queries to MyDuck Server. You can monitor the query distribution by checking:

SELECT * FROM stats.stats_mysql_commands_counters;

Cleanup

You can run docker compose down to clean up all resources after the trial.