phpmyadmin / phpmyadmin/phpmyadmin
Support of Cluster MySQL connections (Read & Write Ports)
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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