www.bortolotto.eu

Newsfeeds
Planet MySQL
Planet MySQL - https://planet.mysql.com

  • Old app, new database… am I screwed?
    Who has never encountered a customer who, for all sorts of reasons (valid or not), was unable to update an application and therefore could no longer connect to the latest versions of MySQL? Or worse still, data that is shared between two applications, one of which absolutely must use the latest version of MySQL and […]

  • Fiddling with MySQL MCP Server During Holidays
    I was able to get the MySQL MCP Server up and running and it was time to try it first time against a sample data set outside of its test suite. Let’s start with Stack Overflow and the value of its data for modern LLMs and AI systems. As most of you already know, the questions in forums has significantly dropped since the launch of OpenAI, aka ChatGPT Source : https://x.com/alojoh/status/2009366134513127462 This is probably true for traditional search engines like Google, although they’re already adopting built-in AI solutions. Other sources, such as Reddit, also provided valuable, quick, and easy information to the masses. I wanted to spin a subset of StackExchange questions. These are loaded into a local MySQL server. I intended to put the MCP server to a test to find out what’s going on. Results aren’t only interesting but also very intriguing. The reason is the questions at these forums and their answers. If these questions and answers don’t exist, how will LLMs train themselves to give precise answers? They may otherwise rely on other outdated sources and start hallucinating. So first thing we spin up the lastes version of the mysql-mcp-server and configure it to work with Claude desktop per the instructions in the documentation. Basically, get the data sample dataset from the StackExchange data dump site. You can ask Cursor, Gemini, or Claude for help. They can set up this data sample in your local MySQL database server. Here’s the github repository for this data set as well. My prompt: Explore Stack Exchange database Stack Exchange: Drones & Model Aircraft – Complete Analysis Community Overview Site: Drones and Model Aircraft Stack ExchangePeriod: April 2020 – March 2024 (4 years)Status: Declining but quality community MetricValueTotal Questions908Total Answers1,277Total Users5,251Total Votes9,983Avg Answers/Question1.41Acceptance Rate49.45%Avg Question Views757 I will not copy and paste the rest of the conversation. It’s a big, long one. However, the results are amazing on the subject of Drones. As a drone pilot for almost a decade, the following questions are seriously intriguing. Most Viral Questions (5K+ Views) TitleViewsScoreAnswersAt what current should I charge a LiPo battery?24,27894Why do brushless motors have 3 wires?17,83482What do ESC beeps mean?16,44452How come DJI Fly App is NOT in Play Store?15,826124How to configure servo in Betaflight?12,05252 Prompt: Why do multirotors usually have four propellers? ACCEPTED ANSWER (27 upvotes) – by Kenn Sebesta TL;DR: Four is the mathematical minimum for simple, robust control The Physics: 4 Degrees of Freedom For hovering aircraft, we need to control 4 degrees of freedom (DoF): Roll (tilt left/right) Pitch (tilt forward/backward) Yaw (rotate clockwise/counterclockwise) Thrust (up/down) (We can control horizontal movement (x-y) by combining roll/pitch with thrust) These are some samples. If you run it yourself, there are amazing insights into the data set. Not only that, but you can question the results, trends, and answers. Going back to MySQL and like any other database out of the box query optimization was terribly wrong. We dug in a bit further. We discovered that most of the queries it ran for the above results were inefficient. 1. Row Count Query – 100x Faster Problem: 9 separate full table scansSolution: Use information_schema.TABLES metadataSpeedup: 2000ms → 20ms 2. Top Users with Posts – 50x Faster Problem: Joins ALL posts for ALL users before filteringSolution: Filter to top 15 users FIRST, then joinSpeedup: 800ms → 15ms Tested successfully – Works perfectly! 3. Monthly Activity – 10x Faster Problem: YEAR() and MONTH() functions prevent index usageSolution: Use DATE_FORMAT() and index-friendly WHERESpeedup: 500ms → 50ms 4. Vote Percentages – 10x Faster Problem: Subquery recalculates total count for each groupSolution: Calculate once with CTE or window functionSpeedup: 400ms → 40ms 5. Answer Distribution – 3x Faster Problem: CASE expression in GROUP BYSolution: Group by integer bucket IDs, then labelSpeedup: 300ms → 100ms This led me to create an optimization guide for the Claude agent. In conclusion, the MCP servers are great resources to explore data sets. With some experimentation and guidance, they can reveal highly valuable analytics use cases. These include marketing and sales data that would normally take too much time and material to cover. Next up is token usage. If you are also wondering, “Where have all my tokens gone using these AI tools?” I have some thoughts on that topic, too.

  • preFOSDEM MySQL Belgian Days 2026 – Agenda
    I am pleased to unveil the agenda for our two days dedicated to MySQL and its community just before FOSDEM. The preFOSDEM MySQL Belgian Days will take place on January 29 and 30th in Brussels. We received many excellent proposals from a wonderful panel of experienced, well-known speakers. We decided to provide as much content as possible, and therefore, two tracks will run in parallel in two different rooms. We tried to cover many topics, and, of course, our new projects, such as the Migration Assistant and the REST Service, will be present. We will have several dedicated sessions on AI and on running MySQL on K8s. The conference will end with the traditional MySQL Rockstar Ceremony. We really think most of you will enjoy this agenda! See you in Belgium. If you haven’t registered yet, click here; registration is mandatory.

  • December 2025 MySQL Community Advent Calendar Recap
    We’re excited to present a recap of the MySQL Community 2025 Advent Calendar posts. Once again, we thoroughly enjoyed preparing and sharing our insights on a diverse range of topics related to MySQL. Continuing the tradition from previous years, the MySQL Community Team contributed a series of daily blog posts throughout December, leading up to […]

  • Decrypting SSL/TLS Traffic with Wireshark and ProxySQL
    Decrypting SSL/TLS Traffic with Wireshark and ProxySQL In this guide, we will walk you through the process of decrypting SSL/TLS traffic to and from ProxySQL using Wireshark. By enabling the SSLKEYLOG feature in ProxySQL and configuring Wireshark to use the SSL key log file, you will be able to view the decrypted traffic for debugging and analysis purposes. Prerequisites Before we begin, make sure you have the following: ProxySQL installed and running. Wireshark installed on your machine. Enabling SSLKEYLOG in ProxySQL You can enable the SSLKEYLOG feature in ProxySQL either by modifying the configuration file or via runtime queries. Enabling SSLKEYLOG via Configuration File Open the ProxySQL configuration file (typically proxysql.cnf) in a text editor. Add or modify the following line to enable SSLKEYLOG support: admin-ssl_keylog_file = <path_to_sslkeylog_file> Replace ‘<path_to_sslkeylog_file>’ with the absolute path or relative path (see Understanding Absolute and Relative Paths) where you want to store the SSL key log file. If you want to disable the SSLKEYLOG feature, leave this variable empty. Save the configuration file and restart ProxySQL for the changes to take effect. Enabling SSLKEYLOG via Runtime Queries Connect to the ProxySQL administration interface using your preferred MySQL client. Execute the following runtime query to enable the SSLKEYLOG feature: SET admin-ssl_keylog_file='<path_to_sslkeylog_file>'; LOAD ADMIN VARIABLES TO RUNTIME; Replace ‘<path_to_sslkeylog_file>’ with the absolute path or relative path (see Understanding Absolute and Relative Paths) where you want to store the SSL key log file. If you want to disable the SSLKEYLOG feature, set the value to an empty string. Capturing and Decrypting SSL/TLS Traffic Capturing SSL/TLS Traffic Open Wireshark on your machine. Start a new capture in Wireshark by clicking on the Capture > Options button (or press ‘Ctrl + K’). In the capture options, select the network interface where ProxySQL’s traffic flows through and click Start. Perform the actions that generate SSL/TLS traffic to and from ProxySQL that you want to decrypt (e.g., sending query to backend server). Once you have captured the desired traffic, stop the capture in Wireshark. In the Wireshark main window, you should see the captured packets. Decrypting SSL/TLS Traffic To decrypt the SSL/TLS traffic, Wireshark will use the SSL key log file generated by ProxySQL. Go to Edit > Preferences (or press ‘Ctrl + Shift + P’). In the Preferences window, select Protocols > TLS. Click on the (Pre)-Master-Secret log filename browse button. In the file dialog, navigate to the location where you specified the SSL key log file in ProxySQL’s configuration or runtime query. Select the SSL key log file and click Open. Click OK to close the Preferences window. Analyzing Decrypted Traffic Now that you have successfully decrypted the SSL/TLS traffic, you can analyze it in Wireshark: Decrypting SSL/TLS Traffic Select a packet that contains SSL/TLS traffic. Expand the Transport Layer Security section in the packet details. You should see decrypted information such as Client Hello, Server Hello, Application Data, etc. Analyze the decrypted information to troubleshoot issues or gather insights about the SSL/TLS communication. Decoding SSL/TLS Traffic as MySQL Protocol Select a packet that contains SSL/TLS traffic. Right-click on the packet and choose Decode As. In the Decode As dialog, select + button. In the Current column, locate the row with the TCP protocol and the appropriate source or destination port (e.g., 13306 for MySQL). In the Decode As column, select MySQL from the dropdown menu. Click OK to apply the decoding changes. Wireshark will now interpret the selected packets as MySQL traffic, allowing you to view the decrypted MySQL protocol information. Expand the Transport Layer Security section in the packet details. You should see decrypted information such as Client Hello, Server Hello, Application Data, etc., along with the MySQL protocol-specific details. Analyze the decrypted information to troubleshoot issues or gather insights about the MySQL communication. Congratulations! You have successfully configured Wireshark to decrypt SSL/TLS traffic to and from ProxySQL using the SSLKEYLOG feature. This allows you to gain deeper visibility into the encrypted traffic for debugging and analysis purposes. Understanding Absolute and Relative Paths When specifying the ‘admin-ssl_keylog_file’ variable, you have two options: Absolute Path: If you provide an absolute path, ProxySQL will use that exact path to create the SSL key log file. For example: ‘/var/log/sslkeylog.txt’ Relative Path: If you provide a relative path, ProxySQL will automatically convert it to an absolute path by prefixing it with the ProxySQL data directory path. For example: ‘sslkeylog.txt’ will be converted to ‘<data_dir>/sslkeylog.txt’. The ‘<data_dir>’ represents the ProxySQL data directory path, which is typically set in the ProxySQL configuration. The post Decrypting SSL/TLS Traffic with Wireshark and ProxySQL appeared first on ProxySQL.