Showing entries 2413 to 2422 of 44089
« 10 Newer Entries | 10 Older Entries »
MySQL Transaction Scope

The idea of ACID transactions are a basic feature of SQL’s individual Data Manipulation Language (DML) commands, like the INSERT, UPDATE, and DELETE statements. Transactions across two or more tables are a natural extension of ACID compliance features provided by DML commands. However, they require a structured programming approach, like a store procedure or like API implemented in an imperative language.

Surprisingly, transaction management wasn’t covered well in Alan Beaulieu’s Learning SQL because he only provided pseudo code logic. While I thought troubleshoot some broken MySQL SQL/PSM logic would be a good learning experience for students, it wasn’t. So, I wrote this sample code to show how to achieve an all or nothing transaction across four tables.

The code for this example on transaction management lets you perform the important tasks necessary to effect transaction …

[Read more]
MySQL in Amazon (RDS)

Up until now we have seen MDS (MySQL Database Service) and MySQL in Azure.
As the Cloud technology keeps moving fast, I thought it would be a good idea to see how to set up a MySQL in Amazon , as a service, that is RDS.

The post MySQL in Amazon (RDS) first appeared on dasini.net - Diary of a MySQL experts.

Installing Galera 4 with MySQL 8 on Ubuntu 20.04

A question has cropped up recently: how does one install Galera Cluster 4 with MySQL 8 on Ubuntu 20.04 LTS (Focal Fossa)? This quick guide will get you started.

Install 3 Galera Cluster nodes with the base OS being Ubuntu 20.04. Remember to run apt update and apt upgrade.

Once this is done, edit: /etc/apt/sources.list.d/galera.list and add the following lines:

deb https://releases.galeracluster.com/galera-4/ubuntu focal main
deb https://releases.galeracluster.com/mysql-wsrep-8.0/ubuntu focal main

Once that is done, don’t forget to also pin the preference to the Galera Cluster repository. To do this, edit: /etc/apt/preferences.d/galera.pref and have it read:

# Prefer the Codership repository
Package: *
Pin: origin releases.galeracluster.com
Pin-Priority: 1001

Once you are done, run apt update yet again. Now you are ready to install Galera Cluster 4 with MySQL 8, just by …

[Read more]
6 Step MySQL Point-In-Time recovery on AWS RDS

Recently one of our customers ran into an issue, wherein a bad actor(code) from the application had made the wrong update to 16 M records of a critical table in the database, causing the entire production process to go down. The application Team was able to find the bad actor and block it, our Remote DBA was involved in the Data Recovery/Rollback.

Here I would like to discuss possible recovery methods for the above said scenario

Delayed Slave:

A simple and effective way to recover is by using a delayed slave, RDS started supporting this feature from version 5.6.40 and 5.7.22 i.e., you can induce a SQL thread delay-interval for applying the writes to a slave, detailed implementation is covered in our blog here. It’s …

[Read more]
Memory saturated MySQL

»If at all possible, we build databases so that the working set of the database fits into memory.« What does that even mean?

Working Set

In computer science, the “Working Set” of a program is the set of things it will be accessing in the near future. Because computer science has not yet solved looking into the future, we are looking at the set of things we accessed most recently and hope for The Best™.

The Best™ here being that our future access pattern is very similar to our most recent past access pattern.

Why Memory Matters

In MySQL, the “things we access” in the Working Set definition is RAM, Memory.

We do care, because memory is fast. How fast is fast?

Images from …

[Read more]
Webinar Summary: Migrate your EOL MySQL Servers

This brief summarises the proceedings and outcomes of the 2nd MyWebinar which was held on 13th February 2021 at Online Webinar. As part of our thought leadership webinar series, our latest hosting webinar Migrate your EOL MySQL Servers (seamless migration to MySQL group replication / InnoDB cluster)

We have conducted MyWebinar with a very positive response with the help of software like zoom hosting arrangement and YouTube streaming and commitment of our business team, We have easily planned the perfect broadcasting for all of the attendees.

Over 30+ people took part in our webinar on 13th Feb 2021, to learn MySQL EOL and upgrade path. The session “Migrate your EOL MySQL servers to HA Complaint GR Cluster / InnoDB Cluster With Zero Downtime” by  …

[Read more]
Oxygen XML Editor

Somebody asked me about how they could convert an XML file to a CSV file to upload into MySQL. They were asking the question based on an old Convert XML to CSV blog post from 2008. Amazing though that is, I had to explain the process no longer requires manual tasks, like calling Java files from the Apache XML Project. All they needed to do was use the Oxygen XML Editor, which is why I wrote this blog post.

For example, I had them use the same sample XML file from the old blog post (shown below) with one change. The encoding value needs to change from latin1 (ISO-8859-1) to unicode (UTF-8). Then, they should put it into a local Windows directory (mine went into the …

[Read more]
How to copy a MySQL user to OCI MDS ?

When you migrate to MySQL Database Service on Oracle Cloud Infrastructure (MDS on OCI), the easiest, fastest and recommended way it to use MySQL Dump & Load Utility.

For more information check these different links:

[Read more]
MySQL NDB Cluster Backup/Restore Challenge

Hey, dolphins! Ready to test your NDB backup and restore skills?

Q1: You have a large database which takes 3 hours to back up. Insert/update/delete traffic will run during the backup. How do you run a backup so that none of the inserts/updates/deletes which are executed after the start of the backup are reflected in the backup files?…

Tweet Share

Table Partitioning In MySQL NDB Cluster And What’s New (Part II)

Whats new in NDB Cluster 7.5 version

In this version, users have more flexible ways of table partitioning rather than the default way thru ldm. Now user can partition the table either by node or by ldm. There are 4 different ways of table partitioning supported, these are:

  • FOR_RP_BY_NODE
  • FOR_ RA_BY_NODE
  • FOR_RP_BY_LDM (Default)
  • FOR_RA_BY_LDM
    • FOR_RA_BY_LDM_X_2
    • FOR_RA_BY_LDM_X_3
    • FOR_RA_BY_LDM_X_4

From the above RA is for Read from any replica i.e either from Primary replica or backup replica and RP is for Read from Primary replica only. The above options user can give either thru create table or from alter table sql statement in the COMMENT section like below.

mysql> create table t1(col1 int unsigned not null primary key …

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