Home |  MySQL Buzz |  FAQ |  Feeds |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 30 of 32 Next 2 Older Entries

Displaying posts with tag: MySQL Proxy (reset)

MySQL Proxy lives – 0.8.4 alpha released
+0 Vote Up -0Vote Down

I was surprised to see that there is a 0.8.4 alpha release of MySQL Proxy released just a few days ago (it has been quiet for more than a year). Download it. Many of the bugs fixed are only referenced in an internal bug tracker according to the changelog. There are still about 83 bugs open in the public tracker. I reckon it is good news since it means its still getting some love from the Oracle MySQL team.

Related posts:

  • MySQL 5.1.26-rc released, and developer resources thoughts
  •   [Read more...]
    Added a Table of Contents
    +1 Vote Up -0Vote Down

    Not a big deal, but I just added a “Table of Contents” page to my blog to make finding older articles much easier.

    I noticed most of my posts are quite lengthy, and it can take a bit of searching/clicking to find an older entry. So unless you happen to recall the ‘month/year’ it was published, which I don’t even remember that, then hopefully this will help.

    Really simple, and looks just like this:

      [Read more...]
    Proxy Trace Revisited with MySQL Proxy 0.8.2
    +2 Vote Up -0Vote Down

    Back in January 2010, I wrote an article titled Proxy Trace : Tracing the Variables and Functions Available within MySQL Proxy.

    That post was basically a lua script I posted which traces the steps of Proxy, outputting comments as it traverses through the various functions, and then outputs the names and values of [most of] the available variables available within Proxy.

    That script worked fine with Proxy 0.7.2 and 0.8.0. It also works just fine with Proxy 0.8.1 (though you need to specify your admin settings in 0.8.1) and 0.8.2 (admin values not necessary).

    However, I did go ahead and build it out a little further.

    I did not add too much, but I did add the following (the full script, trace.lua, is provided at the end of this post):

    • Outputs backends.type variable
    • Expanded the rows returned outputs (returns more
      [Read more...]
    Using MySQL Proxy 0.8.2 on Windows
    +1 Vote Up -0Vote Down

    If you try to start proxy 0.8.2 in Windows, and you receive this error:

    The application has failed to start because its side-by-side configuration is incorrect.

    Then you need to install the Microsoft Visual C++ runtime libraries (per the 0.8.2 changelogs). Here is the snippet from the changelogs (it just doesn’t mention the error):

    The Microsoft Visual C++ runtime libraries are now a requirement for running MySQL Proxy. Users that do not have these libraries must download and install the Microsoft Visual C++ 2008 Service Pack 1 Redistributable Package MFC Security Update. For the current Proxy version, use the following link to obtain the package:

    http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=26368

    (Bug #12836100)

      [Read more...]
    MySQL Proxy 0.8.2 Has Been Released
    Employee_Team +0 Vote Up -0Vote Down

    We are pleased to announce the release of MySQL Proxy 0.8.2.

    Downloads are available from dev.mysql.com:

    http://dev.mysql.com/downloads/mysql-proxy/

    0.8.2 is a maintenance release and focuses on:

    • Adding the protocol changes of MySQL 5.5 and later
    • Removing the "admin" plugin from the list of default plugins as it requires configuration since 0.8.1

    Note to windows users:

    The Microsoft Visual C++ runtime libraries are now a requirement for running MySQL Proxy.

    Users that do not have these libraries must download and install the Microsoft Visual C++ 2008 Service Pack 1 Redistributable Package MFC Security Update. For the current Proxy version, use the following link to obtain


      [Read more...]
    MySQL Proxy 0.8.2 Has Been Released
    Employee_Team +0 Vote Up -0Vote Down

    We are pleased to announce the release of MySQL Proxy 0.8.2.

    Downloads are available from dev.mysql.com:

    http://dev.mysql.com/downloads/mysql-proxy/

    0.8.2 is a maintenance release and focuses on:

    • Adding the protocol changes of MySQL 5.5 and later
    • Removing the "admin" plugin from the list of default plugins as it requires configuration since 0.8.1

    Note to windows users:

    The Microsoft Visual C++ runtime libraries are now a requirement for running MySQL Proxy.

    Users that do not have these libraries must download and install the Microsoft Visual C++ 2008 Service Pack 1 Redistributable Package MFC Security Update. For the current Proxy version, use the following link to obtain


      [Read more...]
    mysqlnd plugins for PHP in practice
    Employee +1 Vote Up -0Vote Down

    If you follow my blog or twitter stream you might know I've recently been at Barcelona to attend the PHP Barcelona conference. Conferences are great for exchanging ideas one of the ideas I discussed with Combell's Thijs Feryn: They are a hosting company providing managed MySQL instances to their customers, as such they run multiple MySQL servers and each server serves a few of their customers. Now they have to provide every customer with database credentials, including a host name to connect to. The issue there is that a fixed hostname takes flexibility out of the setup. Say you have db1.example.com and db2.example.com over time you figure out that there are two high load customers

      [Read more...]
    Syntax for Creating a Windows Service for MySQL (when there are 2 paths which both contain spaces)
    +4 Vote Up -1Vote Down

    Numerous times now, I’ve seen people have troubles creating MySQL services on Windows manually (using ‘sc’), whether it be for mysqld itself, MySQL Proxy, or the MySQL Enterprise Monitor and/or Agent.

    The proper syntax for ‘sc’ can get tricky when you have spaces in pathnames, which is very common in Windows, and the need for –defaults-file (which means two paths each potentially containing spaces).

    So, if you have spaces in both your binpath and your path to –defaults-file, then the following syntax will work for you (all on a single line):

    sc create MySQLEnterpriseMonitorAgent
    binpath= ""C:Program FilesMySQLEnterpriseAgentbinmysql-monitor-agent.exe"
    --defaults-file="C:Program FilesMySQLEnterpriseAgentetcmysql-monitor-agent.ini""
    DisplayName= "MySQL Enterprise Monitor Agent" start= "auto"

    Note that you could easily use the

      [Read more...]
    Getting LuaSocket to Work with MySQL Proxy
    +2 Vote Up -0Vote Down

    I’ve seen some interest in trying to get LuaSocket working with MySQL Proxy, and most of those interested have run into issues getting this set up, so I want to provide a brief walk-through on how to get this set-up and working properly.

    Note I tested this on Windows, so use .so instead of .dll on *nix systems.

    1. Download LuaSocket (contains lua/ and lib/ directories)

    2. Copy contents of ‘lua/’ into the following directory:

    C:Program FilesMySQLmysql-proxy-0.8.0libmysql-proxylua

    3. Copy contents of ‘lib/’ into the following directory:

    C:Program FilesMySQLmysql-proxy-0.8.0bin

    4. In step #3, you should have copied a ‘socket/’ and ‘mime/’ directories into bin/. Rename the directory named “socket” to

      [Read more...]
    Proxy Trace : Tracing the Variables and Functions Available within MySQL Proxy
    +0 Vote Up -0Vote Down

    Have you ever wanted a handy reference of all of the various variables available in MySQL Proxy?

    I’ve written a Lua script that outputs many of the available variables, which is really useful for coding Lua scripts for MySQL Proxy. In addition to the variables, it also generates output during each main function it enters in the Proxy, so you can follow the execution trace, and then see the value of each variable when it is within a particular function.

    I’ve tested this on MySQL Proxy 0.7.2 and the newly available Proxy 0.8.0.

    Here is a sample of the output, where I just connect, and then issue a simple query (SELECT * FROM world.city LIMIT 1):

    C:Program FilesMySQLmysql-proxy-0.8.0bin>mysql-proxy.exe
     --proxy-lua-script=show-vars.lua
    
    /* Entering function connect_server() */
       When the proxy
      [Read more...]
    Writing output to a log file using MySQL Proxy
    +0 Vote Up -0Vote Down

    In my previous post, Capturing Erroneous Queries with MySQL Proxy, I showed how to capture erroneous queries, along with relevant information, that one could not effectively obtain from the MySQL general query log. However, in that post, I simply output the information to the terminal. Therefore, in this example, I want to show how to write this information to a proxy log file.

    To change this to log to a log file does not require too many changes, and so this is a useful example on how to log any proxy-related information to a log file.

  • I perform a check for an existing log file (at least using the variable of name “log_file”), and then assign log_file to the location of where I want the log file to reside (at the beginning of the lua script).
    if (log_file == nil) then
      log_file = "C:/Program
  •   [Read more...]
    SQL Analysis with MySQL Proxy – Part 2
    +2 Vote Up -0Vote Down

    As I outlined in Part 1 MySQL Proxy can be one tool for performing SQL analysis. The impact with any monitoring is the art of monitoring will affect the results, in this case the performance. I don’t recommend enabling this level of detailed monitoring in production, these techniques are designed for development, testing, and possibly stress testing.

    This leads to the question, how do I monitor SQL in production? The simple answer to this question is, Sampling. Take a representative sample of your production system. The implementation of this depends on many factors including your programming technology stack, and your MySQL topology.

    If for example you are using PHP, then defining MySQL proxy on a production system, and executing firewall rules to

      [Read more...]
    SQL query analysis with MySQL Proxy
    +3 Vote Up -2Vote Down

    Long before there was the official Query Analyzer (QUAN), a component of MySQL Enterprise, SQL analysis was possible using MySQL Proxy.

    The following is an introduction to logging and query analysis with MySQL Proxy.

    Get MySQL Proxy

    You need to first download MySQL Proxy. In this example I am using the Linux RHEL5 64bit OS and Version 0.7.2

    $ wget http://dev.mysql.com/get/Downloads/MySQL-Proxy/mysql-proxy-0.7.2-linux-rhel5-x86-64bit.tar.gz/from/http://mirror.trouble-free.net/mysql_mirror/
    $ tar xvfz mysql-proxy-0.7.2-linux-rhel5-x86-64bit.tar.gz
    $ ln -s mysql-proxy-0.7.2-linux-rhel5-x86-64bit mysql-proxy
    $ export PATH=`pwd`/mysql-proxy/sbin:$PATH
    $ mysql-proxy --help-all
    

    Pre-requisites

    MySQL Proxy uses TCP/IP,

      [Read more...]
    Another MySQL Proxy Tutorial
    +1 Vote Up -0Vote Down

    Since MySQL Proxy 0.7.0 is soon to be released, I thought another brief tutorial would be helpful. Today we ran across a good use case, and so I wanted to pass this along. If you’ve not used Proxy yet, this is a great opportunity to get your feet wet with it and some Lua.

    When queries are routed though MySQL Proxy from various servers, the MySQL Server only sees that the query came from the machine Proxy is running on.

    So when you are viewing output of SHOW PROCESSLIST, you have no way of telling what server a particular query originated from.

    However, this could be very useful information to have, especially to determine which server a particular long-running query is coming from at that particular moment in time.

    Output not using Proxy:

    mysql> show processlist;
    +----+------+-----------------+------+---------+------+-------+------------------+
    | Id | User | Host
      [Read more...]
    New interesting open Source releases
    +0 Vote Up -0Vote Down

    In case you haven't noticed them yet ..
    MySQL Proxy has a new release and moved it's public repo to Launchpad.

    (Still Launchpad isn't open source yet .. a matter of time .. but in the meanwhile Jira and Confluence are sadly gaining adoption in the market)

    In the devministration area there is a new Puppet module that automagically populates puppet managed machines in Zenoss , I've seen different people using Puppet to populate their Nagios configs, but adding Zenoss to the list is new.. so when will we see the Zabbix and Hyperic plugins ?

    Oh yes.. and then there is Chef

    MySQL Test Creation Tool Design Change
    +0 Vote Up -0Vote Down
    A few days ago the mysql proxy tool was released (link) and it does exactly what the name would suggest. But it does boast a few features that have changed the development of the test creation tool.
    • It has a Lua interpreter that allows user written scripts or modules to be run by the proxy. These scripts can intercept queries and responses between the client and the MySQL server, and also manipulate them in whatever way necessary. There are examples on the wiki of how to use the scripts.
    • Instead of writing an entirely new command line client, we can use the standard mysql client and focus on the scripts that will intercept the client-server communication and translate that into test cases.
    For these reasons the test creation tool will not be written in C/C++ but instead as Lua modules
      [Read more...]
    Direct MySQL Stream Access
    Employee +0 Vote Up -0Vote Down

    Ever wondered what your PHP application and MySQL actually do? An experimental mysqlnd branch will give you full access to the network communication stream. Using a custom PHP stream filter you can then intercept the communication ... but let's start at the beginning:

    When talking about mysqlnd - the mysql native driver for PHP - we always mention the fact it's native in a way that we're, when possible, using PHP infrastructure. The most common example here is the memory management. By directly using PHP's memory we can avoid unnecessary copies of data from the MySQL Client Library's memory into PHP memory.

    <?php
    $mysqli = mysqli_connect("localhost", "root", "",
      [Read more...]
    MySQL Query Analyzer: Tracking query executions
    +0 Vote Up -0Vote Down
    From a performance standpoint, sometimes even tightly tuned queries can cause a performance drag. The common problem here is not one of actual query performance, rather it is a function of:

    - the velocity and frequency that a query is submiited for execution
    - the total execution time of the aggregated executions

    This could be symptomatic of an application not properly configured for caching (see Darren Oldag's blog on this!), or just overall poor design. Regardless of why, when or how we all know it happens. The trouble with this particular problem is that when a query is tuned, or very simple, it is usually not suspect for being a resource hog. Pulling aggregates for number of execs and total exec time for specific queries is a little




      [Read more...]
    MySQL Query Analyzer: DBA Task #1: Finding Bad Queries
    +0 Vote Up -0Vote Down
    One of the biggest problems I faced as a field DBA was defending my production databases against poorly performing SQL code. Talking to folks at the MySQL UC, during customer visits and trolling the MySQL forums/blogs confirms that this is a common problem and even more challenging when a performance problem pops up during times when no code promotions have taken place.

    Traditional/popular way of finding bad SQL code
    For MySQL DBAs the challenge to identify and isolate resource intensive SQL code is really two-fold; job #1 is to find the offending code (after that the chore becomes fixing it so it performs, but that is a topic for another post). Most MySQL DBAs have used the MySQL Slow Query Log ("SQ Log") at some point to help with job #1. For those not familiar, the SQ Log is enabled by starting MySQL with --log-slow-queries[=file_name]


      [Read more...]
    MySQL Proxy lua scripts from presentation
    +0 Vote Up -0Vote Down

    The following Lua scripts are the examples are from my MySQL Proxy @ OSCON 08 presentation.

    analyze_query.lua

    MySQL Proxy Analyze Query.

    Requires MySQL Proxy Logging Module.

    What is released is the Version for MySQL 5.0. A generic version for all MySQL versions is not yet released.

    histogram.lua

    This script is part of the standard MySQL Proxy examples.

    Other Scripts

    Additional Lua scripts from MySQL forge are available here.

    MySQL Proxy @ OSCON 08
    +0 Vote Up -0Vote Down

    Today I presented with Giuseppe Maxia of Sun Microsystems Inc at OSCON 08 on “MySQL Proxy: From Architecture to Implementation”. I was surprised to find that MySQL has a strong showing with a number of presentations this week.

    Our talk covered the basics of MySQL Proxy, what’s coming in future features, and a number of examples of how I have used Proxy in consulting engagements to improve the information retrieval particularly for identifying performance problems.

    Download Presentations Slides

    Speaking at OSCON
    +0 Vote Up -0Vote Down


    I’ve been accepted to speak at the upcoming 2008 OSCON Conference in Portland Oregon July 21-25 2008, where I’ll be speaking with Giuseppe Maxia on MySQL Proxy. I haven’t seen a schedule yet, so I’m interested if there are any other presenters on MySQL topics!

    Meetup Group and Thoughts on MySQL Proxy
    +0 Vote Up -0Vote Down
    In my opinion, the last MySQL Meetup group in London was a really good event. We met Marten Mickos, former CEO of MySQL and now Senior Vice President of Sun, David Axmark, founder of MySQL and Simon Phipps, Chief Open Source Officer at Sun.

    The main questions to the guests were pretty expected: is it going to change anything in the licensing, the deployment and the platforms of MySQL? The single answer is a "No, nothing is going to change". No change in the licensing (Simon Phipps has clearly stated it), no changes in the Community and Enterprise editions (at least not in the near future) and no changes in the development for Linux, Windows, Solaris and other OSes. There will be more opportunities, instead, of spreading the database in environments that are not the common target for MySQL at the moment. We are definitely

      [Read more...]
    The London Meetup Group and my wishes for MySQL Proxy
    +0 Vote Up -0Vote Down
    There is a big event for the London Meetup Group coming up next week. We will all meet on Wednesday 5 March @ 7pm
    The location: The Lamb
    4 Lambs Conduit St
    Bloomsbury
    London
    WC1N 3LZ

    We will have a very special guest: Marten Mickos, CEO of MySQL (now in his new role, due to the Sun acquisition). Marten will join us and he will be happy to answer to questions, to share opinions and spend some good time with MySQL Brits users in front of a nice drink (no surprise which one will be the best seller :) ).

    From a technical point of you, I have prepared a short presentation on MySQL Proxy, with a basic intro on the project and with some ideas on how to use it and what to expect from a production version. The slides will be uploaded after the venue.

    As usual, I am










      [Read more...]
    Navigating categories within my blog
    Employee +0 Vote Up -0Vote Down

    With 130 entries in the “MySQL” category and no MySQL-related subcategories, my blog had become impossible to search and navigate easily.

    And thus I created a number of new categories for the MySQL entries within my blog. They’re listed in the left navigation bar, below the months, as well as below:

      [Read more...]
    Lua lessons at MySQL University ? for MySQL Proxy
    Employee +0 Vote Up -0Vote Down

    Giuseppe Maxia teased me last week to see whether I could decipher the notice on the Italian web site Punto Informatico about “MySQL University, lezione gratuita su Lua“.

    It’s about Giuseppe teaching MySQL University attendees (for free as in both beer and speech) on the Lua scripting language. The MySQL reason to learn Lua is to do scripting in MySQL Proxy. Don’t worry, the MySQL University session is in English, not Italian, and Giuseppe has deciphered the Italian himself in his blog.

      [Read more...]
    Combining MySQL Proxy with MySQL Cluster
    Employee +0 Vote Up -0Vote Down

    A while ago, I had a discussion with Stewart Smith, Vinay Joosery, Monty Taylor and a number of other MySQLers who know much more about MySQL Cluster than I do. The result is a model for using MySQL Proxy to offload MySQL Cluster from doing Table Scans, without touching the application.

    The discussion started from me asking Stewart about the largest road block for expanding the number of use cases for MySQL Cluster. “Oh, that would probably be doing JOINs and other SELECTs requiring the scanning of large parts of the database”, he replied. “There, other storage engines are faster, such as MyISAM and InnoDB.”

    In a very simple view, the application talks SQL with MySQL Cluster, and gets responses.

    Stewart’s

      [Read more...]
    Maatkit on Ohloh
    +0 Vote Up -0Vote Down

    Sheeri wrote a post (now a 404 error) referring to Maatkit on Ohloh, which I have never heard of before. I took a look at what Ohloh thinks about Maatkit. It's kind of neat. Beyond just the obvious "social website" stuff that's all the rage these days, it actually looks at the project's SVN history, analyzes the codebase, and so on.

    It also estimates 8 person-years of work have gone into the project, and says that at $55,000/year it would cost $450,702 to write the code as it currently exists, which is kind of funny. It took me a whole lot less than 8 years to write. (Perhaps this is why that salary strikes me as unrealistic).

    It has a couple of other interesting things, like a visual timeline of source

      [Read more...]
    MySQL NY Meetup Presentation
    +0 Vote Up -0Vote Down

    Tonight I spoke at the NY MySQL Meetup. The topic “Practical Performance Tips & Tricks” was a full packed 1 hour session, with 4 x 15 minute sections on Beginner, Intermediate, Advanced and MySQL Proxy. The goal to hopefully cover content for different level of attendees. This meeting followed up the large turnout from last month’s meeting with at least 35 people. Thanks again to Logicworks for sponsoring the night and providing the beer and food, especially to adjust for the late arriving presenter.

    My Slides are download able in PDF format here.

    Some additional links that were discussed during the meeting for

      [Read more...]
    MySQL Proxy. Playing with the tutorials
    +0 Vote Up -0Vote Down

    I was playing with the 5 sample tutorial Lua scripts available here with the MySQL Proxy, but I was doing something a little inefficiently.

    I started mysqld, then I started the MySQL Proxy with the lua script, then connected to MySQL via the proxy. To test a different script I was actually killing the MySQL Proxy and restarting with appropriate script, but this is unnecessary. MySQL Proxy will re-read the lua script, as specified with –proxy-lua-script on new connection. All I need to do is copy in the file in question and get a new mysql client connection.

    The tech version of the right way:

    $ cp tutorial-basic.lua running.lua
    $ ./mysql-proxy --proxy-lua-script=running.lua &
    $ mysql -uusr -p -P4040 -h127.0.0.1
    mysql> # do my stuff
    mysql>
      [Read more...]
    Showing entries 1 to 30 of 32 Next 2 Older Entries

    Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

    Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.