Showing entries 2096 to 2105 of 44005
« 10 Newer Entries | 10 Older Entries »
Installing Percona Server for MySQL on Rocky Linux 8

With the CentOS project switching its focus to CentOS Stream, one of the alternatives that aim to function as a downstream build (building and releasing packages after they’re released by Red Hat) is Rocky Linux. This how-to shows how to install Percona Server for MySQL 8.0 on the Rocky Linux distribution.

You can get the information on the distribution release version by checking the /etc/redhat-release file:

[root@rocky ~]# cat /etc/redhat-release
Rocky Linux release 8.4 (Green Obsidian)

Installing and Setting up the Percona Server for MySQL 8.0  Repository

[Read more]
MySQL meetup on MDS & HeatWave

We & local Oracle Cloud Community in Dubai are happy to announce upcoming MySQL OCI meetup scheduled for Wednesday, July 7th, 2021. Please find details below.

  • Date: Wednesday, July 7th, 2021
  • Time: 5:00 PM to 7:00 PM GMT+4
  • Topic: MySQL Database Services (MDS), MySQL HeatWave for Real-time Analytics, demos
  • Speaker: Carsten Thalheimer & Abdullah Zarour, the MySQL Principal Solution Engineers
  • Form: virtual event (via zoom)
  • More information & registration

 

MySQL meetup on MDS & HeatWave

We & local Oracle Cloud Community in Dubai are happy to announce upcoming MySQL OCI meetup scheduled for Wednesday, July 7th, 2021. Please find details below. Date: Wednesday, July 7th, 2021 Time: 5:00 PM to 7:00 PM GMT+4 Topic: MySQL Database Services (MDS), MySQL HeatWave for Real-time Analytics, ...

Percona Monitoring and Management – MySQL Semi-Sync Summary Dashboard

Some of you may use MySQL’s asynchronous replication feature called Semisynchronous Replication (aka semi-sync), and now with the MySQL Semi-Sync Summary Dashboard + Percona Monitoring and Management (PMM), you can see the most important metrics! Refer to the Install & Usage steps for deployment details (note you need Replication Set defined!).

What is Semisynchronous Replication

When enabled, Semisynchronous Replication instructs the Primary to wait until at least one replica has received and logged the event to the replica’s local relay log before completing the COMMIT on a transaction. This provides a higher level of data integrity because now it is known that the data exists in two places. This feature ensures a balance …

[Read more]
Automating MySQL Shell util.dumpInstance and util.dumpShema backups With CRON

    The UNIX/Linux cron command is a popular way to schedule repetitive tasks.  There are many examples on the web on how to use cron with mysqldump to backup MySQL Instances.  I am sure many systems have something similar to the following:

Local Host mysql Backup:
0 1 * * * /usr/bin/mysqldump -uroot -ppassword --opt myDatabase > /directory/MyDumpFilename.sql

    But what if you want to use the new, super-slick MySQL Shell dump utilities? Well, the good news is that it is as simple as it was with the old program. Want to use dumpSchema for the world schema?

0 1 * * * /usr/bin/ mysqlsh root@localhost -e "util.dumpSchemas(['world'],'/tmp/w2')"

    Or dump the entire instance?

0 2 * * * /usr/bin/mysqlsh root@localhost -e "util.dumpInstance('/tmp/i2',{ 'showProgress' : …

[Read more]
Title Case Anyone?

Sometimes life is too surreal. Like when somebody says, “How do you get title case in an Oracle database?” That’s when you know three things about the individual, while suppressing laughter. They’re not very experienced with SQL, likely lazy, and don’t read the documentation.

I had a little fun with somebody today by taking them down a small rat-hole. “Oh, gosh … ” I said, “… let’s write a function for that.” Here’s the joke function, like:

CREATE OR REPLACE
FUNCTION title_case
( string VARCHAR2 ) RETURN VARCHAR2 IS
BEGIN
  /* Change upper case to title case. */
  RETURN UPPER(SUBSTR(string,1,1)) || LOWER(SUBSTR(string,2,LENGTH(string)));
END title_case;
/

Then, we tested it with a query from the pseudo dual table:

SELECT title_case('incredible') AS "Proper Name" FROM dual;

It returned:

Proper Name
----------
Incredible

Then, I said “Oh, that’s not his …

[Read more]
Complex Archival with Percona Toolkit’s pt-archiver

The Problem

I recently worked on a customer engagement where the customer needed to archive a high amount of rows from different tables into another server (in this example for simplicity I am just archiving the results into a file). 

As explained in this other blog post, “Want to archive tables? Use Percona Toolkit’s pt-archiver“, you can use pt-archiver to purge/archive rows from a table that match any “WHERE” condition, but this case was not that easy as the archive/delete condition was complex and involved joining many tables…

The archive conditions involved four tables with the following query and the following table schema. In the example, there are no foreign keys, but this method can be used also with foreign keys by reordering the table archive/purge.

And the delete condition is …

[Read more]
MySQL PHP Transaction

My students liked the MySQL Transaction post but wanted one that showed how an external web application would interact with MySQL in the scope of a transaction. So, I put a little PHP function together that write across two related tables in the context of a transaction. It uses mysqli (MySQL Improved Extension) to connect PHP to the MySQL database.

The function is barebones and uses the oldest approach of hidden inputs to maintain context between rendered forms using an HTML POST method. The hidden inputs are preceded with “h_” and snake case is used for variable names.

The function only writes to two tables. It writes to the member table and when that completes successfully to the contact table. The function:

  • Submits credentials from a file and raises an error when they don’t work.
  • Initializes a …
[Read more]
Test Drive the MySQL Data Service July 1st or July 8th

 Hands-On-Lab SeriesMaximize MySQL Performance with HeatWave and Oracle Cloud

Sessions on July 1st and 8th

10:30 a.m. to 12:30 p.m. CEST


MySQL is the most popular database among the tech community. However, not all the instances perform the same. As systems and applications scale, IT leaders need to constantly improve the performance of their solutions without compromising its security to keep customers' data safe.

HeatWave is a new, in-memory query accelerator for MySQL Database Service available in Oracle Cloud. You will not need any additional skills, tools nor costs to move real-time data from your OLTP database into an OLAP database. Benchmark results show that HeatWave is 2.7x faster and 70% cheaper than Amazon Redshift.  

[Read more]
MySQL in a Docker Container cheat sheet

Here’s a cheat sheet to run MySQL in a Docker container in your Windows or Mac laptop in a few minutes. In this brief how-to you will:

  1. Install Docker Desktop in your laptop
  2. Download official Oracle MySQL image or Docker Inc. image
  3. Start the container
  4. Administer it
  5. Start a MySQL session and start a Linux session

Download and install Docker

You can download Docker Desktop for Windows or Mac from https://docs.docker.com/desktop/. Install like any other application and you’re ready to move to the next step. As you can read from the docs, Docker Desktop will install several things like Docker Compose or Kubernetes. We’ll use both in advanced examples in future posts.

Pull MySQL Server image

Now you can pull the MySQL Server image. You have two options. You can download the …

[Read more]
Showing entries 2096 to 2105 of 44005
« 10 Newer Entries | 10 Older Entries »