iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
ProxySQL sits between your Ubuntu application and one or more MySQL servers. The application connects to ProxySQL’s MySQL listener (commonly port 6033); ProxySQL chooses a backend from configured hostgroups, applies health checks and query rules, and can keep writes on a primary while sending selected reads to replicas.
A reliable setup has three separate operations for every change: edit ProxySQL’s configuration tables, load the change into runtime, and save it to disk. The Admin interface normally listens on 127.0.0.1:6032. If you omit the runtime or disk step, traffic will not use the change or it will disappear after a restart.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsWhat ProxySQL does in a MySQL topology
ProxySQL is a MySQL-compatible proxy and connection router. Your application does not connect directly to each database host. Instead, it opens a normal MySQL connection to ProxySQL, which selects a backend server according to hostgroup membership, user defaults, query rules, server health, weights and replication state.
This indirection lets you add or remove backends without changing application connection strings. It also gives you one place to observe connection pools and query digests, enforce routing policy, and take an unhealthy or lagging server out of service.
#1 Best Overall
- Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
- With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
- Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
- Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
- Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
- Client side: applications and administrative clients connect to ProxySQL’s traffic listener, commonly
6033. - ProxySQL side: the proxy authenticates the client, evaluates the user’s default hostgroup and query rules, then selects an eligible backend.
- Database side: ProxySQL opens pooled connections to MySQL servers, normally on port
3306, and monitors connectivity, ping response, read-only state and replication lag.
ProxySQL does not turn asynchronous MySQL replication into synchronous consistency. Read-after-write behavior, transaction boundaries and session state still need to be designed for your application.
ProxySQL ports and interfaces
| Purpose | Port | What connects there |
|---|---|---|
| MySQL-protocol Admin interface | 6032 |
Administrative MySQL clients on the management interface; the documented default is 127.0.0.1:6032. |
| MySQL traffic interface | 6033 |
Applications and clients that should be load-balanced by ProxySQL; this is the default shown in the configuration example. |
| PostgreSQL-protocol Admin interface | 6132 |
Administrative clients using ProxySQL’s PostgreSQL-protocol interface. |
| Backend MySQL | 3306 in the example |
ProxySQL’s connections to each MySQL server; use the actual port if a backend is configured differently. |
Keep the Admin interface restricted to a management address or localhost. The documented example uses the credentials admin/admin only to demonstrate a connection; replace them before production and do not expose the Admin port to untrusted networks.
Install and start ProxySQL on Ubuntu
Choose a package that matches Ubuntu
Install the ProxySQL package built for the Ubuntu release and CPU architecture of the host that will run the proxy. The package source and repository details change over time, so use the current package instructions for your Ubuntu release rather than copying a package intended for another distribution or release.
After installation, verify that the binary is available and record the installed version:
proxysql --version
The current ProxySQL documentation page used for the command examples displays version v3.0.5, codename Truls. That is an example of the documentation version output, not a statement that every Ubuntu package currently installs that version.
Start the service
Use Ubuntu’s service manager to start ProxySQL, then check the service status using your normal system-service tooling. The official first-steps guide documents these service commands:
service proxysql start
service proxysql stop
service proxysql restart
On a new installation, the service creates and uses its SQLite database. The file /etc/proxysql.cnf is not the continuing source of truth after first startup; later administrative changes are made through the Admin interface and persisted in ProxySQL’s database.
Connect to the Admin interface
Use a MySQL client against port 6032 to configure ProxySQL:
Rank #2
- Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
- Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
- Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
- Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
- Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
mysql -u admin -padmin -h 127.0.0.1 -P6032 --prompt='Admin> '
When using MySQL client 8.4 or later, add --default-auth=mysql_native_password if the client requires it for this connection:
mysql -u admin -padmin -h 127.0.0.1 -P6032
--default-auth=mysql_native_password
--prompt='Admin> '
Change the example password immediately, create separate administrative credentials where appropriate, and bind access to a management interface. The Admin database is not the same thing as the application traffic listener: configuration commands go to 6032, while application sessions should go to 6033.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Understand ProxySQL’s three configuration layers
ProxySQL separates configuration into three layers. Confusing them is the most common reason a seemingly successful change has no effect or vanishes after a restart.
| Layer | Purpose | How to inspect or change it |
|---|---|---|
| Main tables | Editable configuration held by the Admin interface. | Insert or update tables such as mysql_servers, mysql_users and mysql_query_rules. |
| Runtime tables | The configuration currently used by ProxySQL worker threads. | Load a main-table change with the appropriate LOAD ... TO RUNTIME command; inspect tables named runtime_.... |
| Disk layer | Persistent SQLite configuration reloaded after a service restart. | Run the matching SAVE ... TO DISK command after a change is tested. |
The normal sequence is therefore: edit a main table, load it to runtime, verify the runtime table and traffic, then save it to disk. Saving without loading does not activate a change; loading without saving activates it only until the next restart.
-- edit the relevant main tables first
LOAD MYSQL SERVERS TO RUNTIME;
LOAD MYSQL USERS TO RUNTIME;
LOAD MYSQL QUERY RULES TO RUNTIME;
LOAD MYSQL VARIABLES TO RUNTIME;
SAVE MYSQL SERVERS TO DISK;
SAVE MYSQL USERS TO DISK;
SAVE MYSQL QUERY RULES TO DISK;
SAVE MYSQL VARIABLES TO DISK;
Add MySQL backends to hostgroups
Hostgroups are ProxySQL’s routing units. A user’s default hostgroup and a query rule both point to a hostgroup, not directly to an individual server. Servers in the same hostgroup are candidates for the same class of traffic.
The official example places two MySQL servers in hostgroup 1:
INSERT INTO mysql_servers(hostgroup_id,hostname,port)
VALUES (1,'10.0.0.1',3306);
INSERT INTO mysql_servers(hostgroup_id,hostname,port)
VALUES (1,'10.0.0.2',3306);
LOAD MYSQL SERVERS TO RUNTIME;
SAVE MYSQL SERVERS TO DISK;
Use the actual addresses reachable from the ProxySQL host. Backend MySQL accounts must permit connections from the ProxySQL machine, and network controls must allow the configured MySQL port.
Important server fields
hostgroup_id: the routing pool to which the server belongs.hostnameandport: the backend endpoint ProxySQL contacts.weight: distributes traffic proportionally within a hostgroup. A server with a larger weight receives a larger share of eligible traffic.max_connections: caps ProxySQL’s backend connections to that server.status: controls availability.ONLINEaccepts normal routing;OFFLINE_SOFTallows existing work to drain while preventing new assignments;OFFLINE_HARDremoves the server immediately from normal service.max_replication_lag: can keep a replica out of service when its observed lag exceeds the configured threshold.
After adding or changing a server, query runtime_mysql_servers. If the row is present only in mysql_servers, the worker threads have not received the change.
Rank #3
- 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
- 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
- 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
- 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
- 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
Create a least-privilege monitoring account
ProxySQL’s health checks should use a dedicated MySQL account rather than an application administrator. Create it on every backend that ProxySQL will monitor:
CREATE USER 'monitor' IDENTIFIED BY 'replace-with-a-secret';
GRANT USAGE, REPLICATION CLIENT ON *.* TO 'monitor';
The account needs credentials that match ProxySQL’s monitor variables. Keep the password in your normal secret-management process and do not use the documentation’s example value in a real environment.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteSet monitoring credentials and intervals
Configure the monitor username, password and intervals in global_variables. The following example uses a two-second interval for connection, ping and read-only checks:
UPDATE global_variables SET variable_value='monitor'
WHERE variable_name='mysql-monitor_username';
UPDATE global_variables SET variable_value='replace-with-a-secret'
WHERE variable_name='mysql-monitor_password';
UPDATE global_variables SET variable_value='2000'
WHERE variable_name IN ('mysql-monitor_connect_interval',
'mysql-monitor_ping_interval',
'mysql-monitor_read_only_interval');
LOAD MYSQL VARIABLES TO RUNTIME;
SAVE MYSQL VARIABLES TO DISK;
While bringing the pool online, inspect the monitor schema:
SELECT * FROM monitor.mysql_server_connect_log;
SELECT * FROM monitor.mysql_server_ping_log;
SELECT * FROM monitor.mysql_server_read_only_log;
These logs help distinguish a failed login from a network problem, a ping failure or an unexpected MySQL read_only value.
Split writers and readers with replication hostgroups
For a primary-and-replica topology, use separate hostgroups for write and read traffic. In this example, hostgroup 1 is the writer pool and hostgroup 2 is the reader pool:
Free tools Windows power users keep installed
One-click scans. No signup required.
INSERT INTO mysql_replication_hostgroups
(writer_hostgroup,reader_hostgroup,comment)
VALUES (1,2,'cluster1');
LOAD MYSQL SERVERS TO RUNTIME;
ProxySQL monitors each server’s MySQL read_only value. A server reporting read_only=0 is treated as a writer; read_only=1 is treated as a reader. The monitor can therefore move a server between the mapped writer and reader hostgroups as the topology changes. Confirm what ProxySQL observed in monitor.mysql_server_read_only_log.
This mechanism does not itself guarantee that every read is safe to send to a replica. A replica may lag, and a transaction may need to read data written moments earlier. Keep writes on the writer default hostgroup and route only reads that you have classified as safe.
Rank #4
- 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
- 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
- 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
- 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
- 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
Register the application user
The application account must exist in MySQL and in ProxySQL’s mysql_users table. Set the writer hostgroup as the fallback destination:
INSERT INTO mysql_users(username,password,default_hostgroup)
VALUES ('appuser','replace-with-a-secret',1);
LOAD MYSQL USERS TO RUNTIME;
SAVE MYSQL USERS TO DISK;
default_hostgroup is used when no query rule changes the destination. Grant the MySQL account only the privileges the application needs. Use a different secret from the monitor account and from the ProxySQL Admin account.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Write narrow, ordered query rules
ProxySQL evaluates query rules in ascending rule_id order. A rule with a low ID runs before a rule with a higher ID. A matching rule with apply=1 stops later rule evaluation, so rule order is part of your routing policy.
For example, this rule sends a specific normalized SELECT digest from appuser to reader hostgroup 2:
INSERT INTO mysql_query_rules
(rule_id,active,username,match_digest,destination_hostgroup,apply)
VALUES (10,1,'appuser','^SELECT c FROM sbtest1 WHERE id=?',2,1);
LOAD MYSQL QUERY RULES TO RUNTIME;
SAVE MYSQL QUERY RULES TO DISK;
Why use match_digest
Digest matching operates on a normalized representation of a query, so literal values are reduced and the pattern is smaller than matching every complete query string. The official guidance recommends digest matching where possible because it is faster and easier to maintain.
Keep the rules safe for transactions
Do not begin with a catch-all rule that sends every query to a destination hostgroup or sets apply=1. Such a rule can capture traffic before a later, more specific rule is reached. Start with the writer as the user’s default, then add narrowly scoped reads whose consistency requirements you understand.
- Keep writes, schema changes and transaction-critical reads on the writer unless you have a deliberate consistency design.
- Consider session variables, temporary tables, locks and stored procedures before moving a statement to readers.
- Account for read-after-write behavior: a newly committed row may not yet exist on an asynchronous replica.
- Review the normalized digest and the rule order in
runtime_mysql_query_rules, not only in the editable table.
Verify routing before production traffic
Verification should cover configuration state, health monitoring, backend connections and actual query distribution. Run these checks from the Admin interface:
SELECT * FROM runtime_mysql_servers;
SELECT * FROM runtime_mysql_query_rules ORDER BY rule_id;
SELECT hostgroup, SUM(sum_time), SUM(count_star)
FROM stats_mysql_query_digest
GROUP BY hostgroup;
SELECT * FROM stats_mysql_connection_pool;
What each check proves
runtime_mysql_servers: which servers ProxySQL currently considers configured and what status, weight and limits they have.runtime_mysql_query_rules: the active rule order, patterns, destinations andapplybehavior.stats_mysql_connection_pool: pooled backend connections and their hostgroup/server association.stats_mysql_query_digest: aggregate query counts and time by hostgroup, useful for confirming that representative reads and writes landed where intended.- Monitor logs: connection, ping and read-only observations that explain why a server is online, offline or in a different replication hostgroup.
Connect a test application or MySQL client to the traffic listener on 6033, perform representative writes and reads, and correlate the resulting digests and pool rows with the monitor logs. Before production, deliberately test an unavailable backend and a lagging replica so you know whether status changes and routing behavior match your recovery plan.
Best Value
- 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
- 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
- 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
- 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
- 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
Troubleshoot common failures
Changes disappear after a restart
The change was edited and perhaps loaded into runtime, but not persisted. Run the matching SAVE ... TO DISK command after verification. For example, server edits require SAVE MYSQL SERVERS TO DISK; query-rule edits require SAVE MYSQL QUERY RULES TO DISK. Inspect the runtime table first so you do not save an untested configuration.
Traffic never reaches a newly added server
Check the row in runtime_mysql_servers, confirm its status is ONLINE, verify network reachability and backend credentials, then run LOAD MYSQL SERVERS TO RUNTIME. A row that exists only in mysql_servers is still an inactive main-table edit.
Recommended Free Tools
Reads continue going to the writer
Inspect the application user’s default_hostgroup, the active query rules and the replication mapping. Confirm that the monitor sees the intended read_only value. A rule that does not match the normalized digest, or a rule aimed at the writer hostgroup, will not move the query to readers.
A later query rule never matches
Look for an earlier rule with a broad pattern, a destination hostgroup and apply=1. Lower the broad rule’s priority by assigning it a higher rule_id, narrow its pattern, or remove apply=1 when later evaluation is required. Always inspect runtime_mysql_query_rules because the runtime order, not an unsaved main-table edit, controls traffic.
Backends repeatedly move offline
Read the monitor connection, ping and read-only logs. Check monitor credentials, firewall and routing, DNS or address resolution, MySQL listener binding, server capacity and replication lag. If max_replication_lag is configured, determine whether the threshold is being exceeded before changing query rules. Fix the underlying health signal rather than forcing an unhealthy server back to ONLINE.
Operational choices for a single node or redundant deployment
A single ProxySQL node is simpler, but it is also a single failure domain. A clustered or redundant arrangement adds configuration synchronization and failover behavior that must be tested alongside the MySQL topology.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →| Decision area | Single ProxySQL node | Clustered or redundant deployment |
|---|---|---|
| Failure-domain coverage | The proxy host can become a connection bottleneck or outage. | Multiple proxy instances can reduce proxy-host failure risk, provided clients can fail over between them. |
| Configuration synchronization | One Admin database is straightforward to operate. | Synchronization and conflict handling must be defined and tested. |
| Health-check and failover behavior | One monitor makes behavior easier to observe. | Each proxy’s view and failover timing must be consistent enough for the application. |
| Connection capacity | Capacity planning focuses on one process and host. | Capacity and pool limits must be planned per instance and across the fleet. |
| Observability | One set of runtime, pool and digest tables. | Metrics and logs from every proxy need central correlation. |
| Operational complexity | Lower setup and maintenance overhead. | More moving parts, but potentially better availability. |
ProxySQL documentation covers clustering, replication hostgroups, Group Replication and Galera configurations. Select the architecture that matches your MySQL replication technology, consistency requirements and availability target rather than adding clustering solely because it is available.
Quick Recap
Production readiness checklist
- ProxySQL is installed from a package appropriate for the Ubuntu release, and
proxysql --versionis recorded. - The Admin interface is restricted to a management address, example credentials are replaced and the application uses the traffic listener instead of port
6032. - Every backend appears in
runtime_mysql_serverswith the intended hostgroup, port, status, weight and connection limit. - A dedicated monitor account has only the required
USAGEandREPLICATION CLIENTprivileges. - Monitor credentials and intervals are loaded to runtime and saved to disk.
- Replication hostgroups reflect the actual primary and replica roles, and
read_onlyobservations are visible in the monitor log. - The application user exists in both MySQL and
mysql_users, with a least-privilege grant and a writer fallback hostgroup. - Query rules are specific, ordered, digest-based where practical, and reviewed for transaction and read-after-write effects.
- Every intentional configuration change is both loaded to runtime and saved to disk.
- Representative writes, safe reads, backend failure and replica lag have been tested while watching connection pools, query digests and monitor logs.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

