Showing entries 1 to 10 of 21927
10 Older Entries »
Displaying posts with tag: MySQL (reset)
How to avoid data loss in MySQL Primary Key change

Primary keys are the backbone of efficient data access and maintaining data consistency in your MySQL databases. However, altering them requires careful planning and execution, as incorrect procedures can lead…

The post How to avoid data loss in MySQL Primary Key change first appeared on Change Is Inevitable.

Parametric Queries

In 2021, I wrote a MySQL example for my class on the usefulness of Common Table Expressions (CTEs). When discussing the original post, I would comment on how you could extend the last example to build a parametric reporting table.

Somebody finally asked for a concrete example. So, this explains how to build a sample MySQL parametric query by leveraging a filter cross join and tests the parameter use with a Python script.

You can build this in any database you prefer but I used a studentdb database with the sakila sample database installed. I’ve granted privileges to both databases to the student user. The following SQL is required for the example:

-- Conditionally drop the levels table.
DROP TABLE IF EXISTS levels;
 
-- Create the levels list.
CREATE TABLE levels
( level_id       int unsigned primary key auto_increment
, …
[Read more]
MySQL Shell for VS Code – Bastion Host & Invalid fingerprint detected

If you use MySQL Shell for Visual Studio Code, using a bastion host is the easiest method to connect to a MySQL HeatWave DB Instance on OCI.

If you already have a connection setup using a bastion to host, you may experience the same problem as me, MySQL Shell complains about an invalid fingerprint detected:

This error has nothing to do with the fingerprint of your user OCI Key. The problem is related to the key of your bastion host as you can see in the output window:

This happens if you have changed your bastion host for example.

To resolve the problem, remove the current ssh host key for the bastion host stored in your know_hosts:

$ ssh-keygen -R "host.bastion.us-ashburn-1.oci.oraclecloud.com"

Use the name of your bastion host of course.

When done, it’s already fixed, you can connect back to your MySQL HeatWave DB Instance using MySQL Shell …

[Read more]
Backing up and Restoring to AWS S3 With Percona Kubernetes Operators

In our last post, we looked into the lifecycle of applications in Kubernetes. We see that Kubernetes doesn’t handle database backups itself. This is where Kubernetes Operators come into action. They add additional functions to Kubernetes, enabling it to set up, configure, and manage complex applications like databases within a Kubernetes environment for the user.In […]

Exploring the Kubernetes Application Lifecycle With Percona

This post was originally published on the Percona Community blog.If you are in the world of application development, you know that every application has a lifecycle. An application lifecycle refers to the stages that our application goes through, from initial planning, building, deployment, monitoring, and maintenance in different environments where our application can be executed.On […]

MySQL InnoDB: Primary Key always included in secondary indexes as the right-most columns… or not

Recently during the Swedish MySQL User Group (SMUG), I presented a session dedicated to MySQL InnoDB Primary Keys.

I forgot to mention a detail that many people are not aware, but Jeremy Cole has pointed out.

Primary Key always included in secondary indexes at the right-most column

When we define a secondary index, the secondary index includes the Primary Key as the right-most column of the index. It’s silently added, meaning that it’s not visible but it’s used to point back to the record in the clustered index.

This is an example with a table having a Primary Key composed of multiple columns:

CREATE TABLE `t1` (
`a` int NOT NULL,
`b` int NOT NULL, 
`c` int NOT NULL,
`d` int NOT NULL,
`e` int …
[Read more]
Considering Alternatives for Your MySQL Migration? Why Percona Should Be Your First Choice

You know about MySQL; we know about MySQL. After all, it’s been the most popular database system for years now. And now that we have that out of the way, on to the more important stuff!Because MySQL is so popular, you might be considering migrating your database to MySQL Community Edition or MySQL Enterprise. If […]

Can Disk Space Be Saved in MySQL by Adding a Primary Key?

Historically, MySQL does not require explicit primary key defined on tables, and it’s like that by default till this day (MySQL version 8.3.0). Such a requirement is imposed through two replication methods, though: Group Replication and Percona XtraDB Cluster (PXC), where using tables without a primary key is not allowed by default. There are many […]

Newsletter Repost – OpenLampTech issue #116

SheetDB API for Google Sheets | SQL execution order | WordPress ACF big update | Do you need foreign keys | WordPress plugin git repo set up.

Code, content, and community for developers.

The LAMP stack and the PHP technologies and frameworks it runs.

Be sure you’re subscribed to OpenLampTech so you don’t miss out on any of the content each week.

Thank you for reading this post. Please share it with someone else who would enjoy it as well.

Disclaimer: The majority of examples in this post, are performed in a personal development/learning workstation environment and should not be considered production quality or ready. Your particular goals and needs may vary. Like always, just because …

[Read more]
MySQL 8.2.0 Community vs. Enterprise; Is There a Winner?

To be honest, the comparison between the two MySQL distributions is not something that excited me a lot. Mainly because from my MySQL memories, I knew that there is not a real difference between the two distributions when talking about the code base.To my knowledge the differences in the enterprise version are in the additional […]

Showing entries 1 to 10 of 21927
10 Older Entries »