New series of articles about how to find useful informarion when using MySQL Database Service.
The latest from the MySQL community
Ideas, releases, practical guides, and perspectives from the people building with MySQL.
I just booked my travel arrangements for Percona Live 2023. In case you missed it, one of the most important MySQL Conference of the year is happening in Denver from Monday May 22 to Wednesday 24. I will be there and I am giving a talk about how HubSpot operates Percona Server / MySQL with Vitess in Kubernetes. My colleague, Mali Akmanalp, is also speaking about the tools we
With local or on-premise instances of MySQL, we can use the general_log to view the queries that are executed when we make calls to the MySQL Document Store API. This approach, however, does not work when working with MySQL Database Service (MDS) instances running in Oracle Cloud Infrastructure. In this post, we'll show you how to get the raw SQL that is executed on as MDS instance when we make calls to the Document Store API.
ProxySQL is a great load balancer which however suffers from some shortcomings concerning the management of MySQL users. ProxySQL provides a firewall which, in my case, is not complete enough to properly manage users and secure their access. Indeed, this firewall does not accept subnets and keeps unauthorized connections in ProxySQL. We cannot then be sure of not suffering a DDOS attack on our ProxySQL instance. In this article, I will explain how I managed to overcome this problem.
Reminder of the principle of connection through ProxySQL
To understand what follows, you have to bear in mind how ProxySQL connects to MySQL. The user connects to Proxysql which then establishes the connection to MySQL. For this, ProxySQL maintains MySQL users in its internal database. The names of MySQL users, their passwords as well as the MySQL destination server are entered in the mysql_users table. At each connection request to a MySQL server, …
[Read more]In a previous post, we talked about how you can view the underlying queries that are run when we make calls to the MySQL Document Store API. While this solution works well on a local or other on-premise instance of MySQL, it is not a viable option for viewing those same queries on a MySQL Database Service (MDS) instance running […]
A partitioned table in MySQL has its data separated into different tablespaces while still being viewed as a single table. Partitioning can be a useful approach in some cases when handling huge sets of data. Deleting huge data sets could be quickened up in a partitioned table, but if not handled properly, it can misplace your data in the table. In this blog, I will share how to check and fix the data in such a table with minimal disruption to the table.
In this example, we use a table partitioned based on a date range.
mysql> show create table salariesG
*************************** 1. row ***************************
Table: salaries
Create Table: CREATE TABLE `salaries` (
`emp_no` int(11) NOT NULL,
`salary` int(11) NOT NULL,
`from_date` date NOT NULL,
`to_date` date NOT NULL,
PRIMARY KEY (`emp_no`,`from_date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50500 PARTITION BY RANGE COLUMNS(from_date)
(PARTITION p01 VALUES LESS …[Read more]
In the MySQL world, EXPLAIN is a keyword used to
gain information about query execution. This blog post will
demonstrate how to utilize MySQL EXPLAIN to remedy
problematic queries.
On the Technical Solutions team here at PlanetScale, we
frequently talk with users who seek advice regarding query
performance. Although creating an EXPLAIN plan is
relatively simple, the output isn’t exactly intuitive. It’s
essential to understand its features and how to leverage it best
to achieve performance goals.
When you prepend the EXPLAIN keyword to the
beginning of a query, it explains how the database executes that
query and the estimated costs. By leveraging this internal MySQL
tool, you can observe the following: …
Learn how to read the output in MySQL EXPLAIN plans so you can utilize them to improve query performance.
As a MySQL DBA, you like to know who is connected on the system you manage. You also like to know who is trying to connect.
In this article, we will discover how we can retrieve the information and control who is using the MySQL DB instance we launched in OCI.
Secure Connections
The first thing we can check is that all our clients encrypt their connection to the MySQL server.
We use again Performance_Schema to retrieve the
relevant information:
select connection_type, substring_index(substring_index(name,"/",2),"/",-1) name,
sbt.variable_value AS tls_version, t2.variable_value AS cipher,
processlist_user AS user, processlist_host AS host
from performance_schema.status_by_thread AS sbt
join performance_schema.threads AS t
on t.thread_id = sbt.thread_id
join performance_schema.status_by_thread AS t2
on t2.thread_id = t.thread_id
where sbt.variable_name = 'Ssl_version' and …[Read more]
New series of articles about how to find useful informarion when using MySQL Database Service.