Showing entries 2853 to 2862 of 44089
« 10 Newer Entries | 10 Older Entries »
Checking Data Consistency for RDS for MySQL

MySQL for RDS and DBaaS, in general, are very controlled environments by the vendors, meaning that there are missing things like a SUPER grant for the root user (and any user in general). This has some implications on operations, one of them being the impossibility of running pt-table-checksum to verify data consistency between a primary and its replicas.

However, there’s a workaround that might overcome this situation and involves three things:

  • The pt-table-checksum itself
  • A way to collect executed queries
  • And the last one, which can be controversial, is to remove the read-only from the replica and use a maintenance window to stop traffic to the database while pt-table-checksum runs.

The problem with RDS is that you cannot change binlog_format to STATEMENT, which is one of the requirements for pt-table-checksum to run.

The workaround consists of capturing the executed …

[Read more]
Releasing ProxySQL 2.0.14

ProxySQL is proud to announce the release of the latest stable version of ProxySQL 2.0.14 on the 8th of September 2020

ProxySQL is a high performance, high availability, protocol aware proxy for MySQL, with a GPL license! It can be downloaded here or alternatively from the ProxySQL Repository, and freely usable and accessible according to the GNU GPL v3.0 license.

Release Overview Highlights

Before discussing the features and fixes in this release we’d like to mention that we are aware of the delays in new releases. Ideally we would like to release ProxySQL more rapidly however we have recently been focusing our development efforts on ProxySQL 2.1.

The next edition of ProxySQL brings improved performance as well as many new and exciting …

[Read more]
MySQL: Generated Columns and virtual indexes

We have had a look at how MySQL 8 handles JSON recently, but with all those JSON functions and expressions it is clear that many JSON accesses cannot be fast. To grab data from a JSON column, you will use a lot of $->>field expressions and similar, and without indexes nothing of this will be fast.

JSON cannot be indexed.

But MySQL 8 offers another feature that comes in handy: Generated columns and indexes on those. Let’s look at the parts, step by step, and how to make them work, because they are useful even outside of the context of JSON.

An example table

For the following example we are going to define a table t1 with an integer id and two integer data fields, a and b. We will be filling it with random integers up to 999 for the data values:

[Read more]
Author on Oracle MySQL Blog

You may have noticed, I started to blog also on the official Oracle MySQL Blog.

When I will do so, I will also publish my articles on lefred.be after a short delay.

I really invite you to follow the official Oracle MySQL Blog where you will find information related to MySQL Community but also about our webinars.

Currently, we put the highlight on our great new MySQL Database Service on OCI. My first post, is precisely dedicated to it.

MySQL from a Developers Perspective

So this has turned into a small series, explaining how to work with MYSQL from a developers perspective. This post is intended as a directory for the individual articles. It will be amended and re-dated as necessary.

The code for the series is also available in isotopp/mysql-dev-examples on GitHub.

The Tag #mysqldev will reference all articles from this series.

  • MySQL Transactions - the physical side. Looking at how MySQL InnoDB handles transactions on the physical media, enabling rollback and commit. Introduces a number of important concepts: The Undo Log, the Redo Log, the Doublewrite Buffer, and the corrosponding in memory …

[Read more]
InnoDB Data Locking – Part 1 “Introduction”

In this blog series, I’d like to introduce you gently to the topic on which I was working last 2 years, which is improving how InnoDB locks data (tables and rows) in order to provide illusion to clients that their queries are executed one after another, while in reality there is a lot of concurrency.…

Facebook Twitter LinkedIn

MySQL: Basic usage of the JSON data type

MySQL 8 provides solid support for the JSON data type. The manual has an overview of the data type, a JSON function reference, an an overview on generated column indexes, and explains multi-values indexes.

Creating JSON columns

Creating JSON columns is easy: Make the column of the JSON data type, fill in valid JSON data.

mysql> create table t ( id integer not null primary key auto_increment, j json);
Query OK, 0 rows affected (0.11 sec)

mysql> insert into t (j) values 
-> ('null'),
-> ('true'),
-> …
[Read more]
How to enable slow query log on Google Cloud SQL for MySQL and PostgreSQL

In this post, we will quickly demonstrate how to enable Slow Query Log on Google Cloud SQL for MySQL.

  1. Open Cloud SQL Dashboard
  2. Click Edit on your Database
  3. For Cloud SQL MySQL instances, add these 3 flags (a.k.a. configuration parameters) to your instance:
    • log_output - file / table / none
      We recommend to choose file, which will help you to quickly visualize and analyze your slow query using EverSQL
    • slow_query_log - On/Off
    • long_query_time - number, in seconds.
      For example, 1 means that the log will capture all queries that are longer than 1 …
[Read more]
ProxySQL Query Rules: Notes From Production

After spending four years working with ProxySQL in production, I’ve learned a few interesting lessons about interpreting and processing query rules. I hope to save you some time (and avoid wrong turns) with this summary of ProxySQL query rules.

ProxySQL query engine is very powerful and supports the building of complex rule sets. These can be used to route traffic to backend MySQL instances, rewrite queries, and for traffic mirroring, among other use cases.

When the rule set is short and simple, you can easily understand what the outcome for a certain query would be. However, for complex sets or combined scenarios, you need a deeper understanding of the engine logic.

Note 1: Rules are processed in rule_id order

It might seem like a trivial start, but during testing or implementation, …

[Read more]
Migrate from on premise MySQL to MySQL Database Service

If you are running MySQL on premise, it's maybe the right time to think about migrating your lovely MySQL database somewhere where the MySQL Team prepared a comfortable place for it to stay running and safe.

This awesome place is MySQL Database Service in OCI. For more information about what MDS is and what it provides, please check this blog from my colleague Airton Lastori.

One important word that should come to your mind when we talk about MDS is SECURITY !

Therefore, MDS endpoint can only be a private IP in OCI. This means you won't be able to expose your MySQL database publicly on the Internet.

Now that we are aware of this, if we want to migrate an existing database to the MDS, we need to take care of that.

What is my case …

[Read more]
Showing entries 2853 to 2862 of 44089
« 10 Newer Entries | 10 Older Entries »