Skip to content

Dotfinity/proxysql-admin-ui

Repository files navigation

GitHub Actions Workflow Status


ProxySQL Admin UI

A modern web interface for managing ProxySQL, built with Blazor and .NET Core.

Screenshots

Dashboard Qiery digest stats Query rules page Admin global variables editor page

Features

  • Dashboard with metrics
  • ProxySQL management:
    • Mysql backend server configuration
    • Mysql Users configuration
    • Query rules configuration
    • Query digest grid with stats and filters
    • Global variables configuration

Tech Stack

Getting Started

Prerequisites

  • .NET 8 SDK
  • Running ProxySQL instance

Configuration

Local Configuration

  1. Configure ProxySQL connection in appsettings.json:
"ConnectionStrings": {
    "ProxySqlContext": "Server=0.0.0.0;Port=6033;Uid=radmin;Pwd=radmin;ConnectionReset=False;Pooling=True;ConnectionLifeTime=3000000;"
  },
  "DefaultUsers": [
    {
      "Username": "admin",
      "Password": "AdminAdminAdmin1"
    }
  ]
  1. Start the application:
dotnet watch --project ProxysqlAdminUi.Web/ProxysqlAdminUi.Web.csproj

Docker Configuration

Set the environment variables in the docker-compose.yml file:

environment:
  ASPNETCORE_ENVIRONMENT: Production
  ASPNETCORE_URLS: 'http://+:8000'
  # Connection string for the ProxySQL server
  PAI_ConnectionStrings__ProxySqlContext: 'Server=xxxxxx;Port=6033;Uid=radmin;Pwd=radmin;ConnectionReset=False;Pooling=True;ConnectionLifeTime=3000000;'

or if you're running the app and the proxysql server in the same docker-compose file, you can use the service name as the host:

environment:
  ASPNETCORE_ENVIRONMENT: Production
  ASPNETCORE_URLS: 'http://+:8000'
  # Connection string for the ProxySQL server
  PAI_ConnectionStrings__ProxySqlContext: 'Server=proxysql;Port=6033;Uid=radmin;Pwd=radmin;ConnectionReset=False;Pooling=True;ConnectionLifeTime=3000000;'

Random notes

One query rule can have many digests! example: if one rule matches by table prefix "ps_setting*" if there are 10 tables being accessed, via 20 queries, that would result in 40 different digests. 20 for the uncached queries and 20 for the cache hits.

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

A modern ProxySql admin management interface

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages