In MySQL, you cannot do this: create table t (i int primary key, j int); insert into t values (1, 1); update t set j = (select max(j) from t) + 1; The UPDATE statement will raise an error as follows: SQL Error [1093] [HY000]: You can't specify target table 't' for update in FROM … Continue reading Workaround for MySQL’s “can’t specify target table for update in FROM clause” Error →
The latest from the MySQL community
Ideas, releases, practical guides, and perspectives from the people building with MySQL.
Since the release of MySQL 8.0, the MySQL X Dev API has provided users with the convenient ability to utilize MySQL without the need to write a single line of SQL!
MySQL X Dev API brings the support for CRUD operations on JSON documents that are stored in MySQL. MySQL Document Store is ACID compliant and is compatible with everything MySQL like replication, InnoDB Cluster, …
The MySQL X Dev API is available using the MySQL X Protocol, listening by default on port 33060.
If you are interested in learning more about MySQL Document Store, please refer to the these presentations [1], [2], [ …
[Read more]Some time ago, we saw how we could deploy WordPress on OCI using MySQL HeatWave Database Service with Read Replicas. We had to modify WordPress to use a specific plugin that configures the Read/Write Splitting on the application (WordPress): LudicrousDB.
Today, we will not modify WordPress to split the Read and Write operations, but we will use MySQL Router 8.2.0 (see [1], [2], [3]).
Architecture
The …
[Read more]MySQL in Dec-Feb24
Over 15 years ago, GitHub started as a Ruby on Rails application with a single MySQL database. Since then, GitHub has evolved its MySQL architecture to meet the scaling and resiliency needs of the platform—including building for high availability, implementing testing automation, and partitioning the data. Today, MySQL remains a core part of GitHub’s infrastructure and our relational database of choice.
This is the story of how we upgraded our fleet of 1200+ MySQL hosts to 8.0. Upgrading the fleet with no impact to our Service Level Objectives (SLO) was no small feat–planning, testing and the upgrade itself took over a year and …
[Read more]As a follow up to the previous blog from Aug 15, we are happy to announce a list of events and conferences where you can find MySQL Community and/or MySQL Team at. Please see the updated list below, with past events at the end of the report below: Past Events:
MySQL offers a wide array of options to configure replication, but with all of those options, how can you be sure you are doing it right?
Replication is the first step to providing a higher level of availability to your MySQL database. A well configured replication architecture can be the difference between your data being highly available, or your MySQL setup becoming a management nightmare. At PlanetScale, we support hundreds of thousands of database clusters, all using replication to provide high availability, so we have a little bit of experience in this arena!
In this article, we’re going to explore some of the best practices when it comes to replication, both locally and across longer distances.
Use an active/passive configuration
When replicating with …
[Read more]We don't say that quite often, but here is an update to end all updates, one of the biggest bulks of new features and enhancements that dbForge Studio for MySQL has ever seen.
The post Meet the Grand New dbForge Studio MySQL 10.0 with Integrated Source Control! appeared first on Devart Blog.
A common strategy of modern development, especially in serverless applications, is to offload user management to third-party authentication services, commonly referred to as Identity Providers (IdP). While this shifts the focus and responsibility of managing your users’ data to another organization, implementing this strategy brings several tradeoffs:
- You don’t have direct access to user data within your own systems.
- You can’t perform secondary actions when a user changes their data in some way.
- Any API calls where the user’s info is used would require you to call the IdP, making the responses take longer.
In this article, you’ll learn how to address each of these issues using webhooks, a pattern where the IdP can send an HTTP call to your API to inform you of any changes made on their end. To do this, you’ll be using a combination of Clerk, Netlify, and PlanetScale.
For …
[Read more]In this blog post, we’ll review how to run Linux profilers such as perf and produce flame graphs on Kubernetes environments.
Flame graphs are a graphical representation of function calls. It shows which code paths are more busy on the CPU in given samples. They can be generated with any OS profiler that contains stack traces such as perf, eBPF, and SystemTap.
An example of a flame graph can be found below:
Each box is a function in the stack, and wider boxes mean more time the system was busy on CPU on these functions.
Kubernetes limitations
In Linux, by default, performance system events can’t be collected by unprivileged users. In regular environments, this can be easily worked around by running the profiler with a sudo privilege.
On the other hand, in Kubernetes environments, pods are the smallest deployable unit that consists of one or more containers. Exploits are generally targeted to …
[Read more]