phpmyadmin / phpmyadmin/phpmyadmin

Support of Cluster MySQL connections (Read & Write Ports)

Open
#19,311 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement undecided
Dominant language
PHP
Stars
7.9k
Forks
3.6k
Avg merge
4d 18h
Merged PRs (30d)
36

Description

Is your feature request related to a problem? Please describe.

We have slowness issues depending on which locaiton our primary database lives in. We use a database cluster and have multiple sites and multiple databases. Depending on where we run Phpmyadmin, if the Primary database is in another location, queries are much slower.

Describe the solution you'd like

We'd like to ask that PhpMyAdmin starts to support a read and a write "Port" instead of a single "Port". This would make use of MySQL's "router" application that sends the "Reads" to a secondary MySQL instead of sending all queries to the Primary. And only the "Writes" over the "Write Port" would be sent to the Primary database for inserting, updating and deleting.

Settings would look something like:

$cfg['Servers'][$i]['read-port'] <-- All Select queries
$cfg['Servers'][$i]['write-port'] or write's could just use the default: $cfg['Servers'][$i]['port'] <-- All Insert, Update & Delete

MySQL Router install page for reference with the read and write ports: https://dev.mysql.com/doc/mysql-installer/en/mysql-installer-workflow-nonserver-products.html

Describe alternatives you've considered

I haven't found another solution

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the existing single $cfg['Servers'][$i]['port'] connection setting is used for query execution. Review the linked MySQL Router documentation and determine how read versus write routing would affect SELECT, INSERT, UPDATE, and DELETE operations. Done means defining and implementing a safe configuration and routing design, with coverage for both ports.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, php
Domain
backend, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.