Intro to MySQL Proxy

Written By
Web Webster
Web Webster
Jan 15, 2009

“There are many applications for this technology, and once you
start dabbling, your mind will surely run wild with ideas. For
instance, the default MySQL server’s slow query log provides only
single second granularity. If you want microsecond control, you’ll
have to add the Google patches to get it. That requires a recompile
of the MySQL source, which many administrators would resist. Enter
the MySQL-Proxy, which comes with a lua script to do just that. You
can get the subsecond granularity, and log queries accordingly.
What’s great is that you can install it on a running system,
without any big changes. Instead of having your app connect to port
3306, you’ll point it to port 4040 of the proxy. But what about
without changing any application code at all? One way would be to
run mysql on a different port, and restart it. Then run the proxy
on port 3306. However, an even better way is to you Linux’s
iptables to reroute all incoming connections on port 3306. Take a
look at this link for code snippets to do that:”


Complete Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.