Showing entries 2783 to 2792 of 44045
« 10 Newer Entries | 10 Older Entries »
How To Inject an Empty XA Transaction in MySQL

If you are using XA transactions, then you’ve likely run into a few replication issues with the 2PCs (2 Phase Commits). Here is a common error we see in Percona’s Managed Services and a few ways to handle it, including injecting an empty XA transaction.

Last_Error: Error 'XAER_NOTA: Unknown XID' on query. Default database: 'punisher'. Query: 'XA COMMIT X'1a',X'a1',1'

What Does it Mean?

It means that replication has tried to commit an XID (XA transaction ID) that does not exist on the server. We can verify that it does not exist by checking:

replica1 [localhost:20002] {msandbox} ((none)) > XA RECOVER CONVERT XID;
+----------+--------------+--------------+--------+
| formatID | gtrid_length | bqual_length | data   |
+----------+--------------+--------------+--------+
|        1 |            1 |            1 | 0x2BB2 | …
[Read more]
Testing MySQL Database Service without VPN – part 2

In a recent article, I explained how to test MySQL Database Service (aka MDS) on OCI without having to setup a VPN.

A VPN is the recommended way and of course using some man-in-the-middle exposing the MySQL Classic and X Protocol port is something you should absolutely avoid !

So, in this article we will see another way to test or use MDS without VPN but using a more secure option.

SSH

The solution uses a SSH tunnel between your machine (laptop, etc..) and OCI.

How does it work ?

We have a MDS instance (10.0.1.3), and a compute instance (10.0.0.2). The compute instance is in the public subnet and has a public IP assigned to it.

Then we open a SSH tunnel to the compute instance’s public IP that forward all traffic to a certain port on localhost (we will use 3406) …

[Read more]
Recovering A Corrupt MySQL Database

Author Andriy Lysyuk.

The unDROP for InnoDB tool can be used to recover corrupt MySQL databases. In this post, we will show how to repair a MySQL database if its files got corrupted and even innodb_force_recovery=6 doesn’t help.

The corruption of InnoDB tablespace may be caused by many reasons. A dying hard drive can write garbage, thus, page checksum will be wrong. InnoDB then reports to the error log:

InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 4.

MySQL is well known for its poor start-up script. A simple upgrade procedure may end up with two mysqld processes writing to the same tablespace. That leads to corruption too. Sometimes, power reset corrupts not only the InnoDB files, but the whole file system becomes unusable for …

[Read more]
How to Upgrade to MySQL 8.0 – Free Course at Percona University Online

MySQL 8.0 General Availability release was launched in April 2018, and since then there have been ten versions of MySQL 8 and Percona Server for MySQL released. The MySQL Community expressed a high opinion of the MySQL 8.0 advantages, so a lot of databases have been successfully upgraded to the new version. But many of them still need to be up to date.

Percona has prepared a free course “How to Upgrade to MySQL 8.0” that helps you with this task.

It is a series of useful videos for 3-4 minutes. At the end of the course, you can pass the QUIZ and get a certificate. 

Follow the link to take the course:  https://classroom.google.com/c/MTM2MDIyNDIzMDQy?cjc=zjsst4l

You can also join the course manually. Just open Google Classroom and click “Join class” and enter the code of the class “zjsst4l”. …

[Read more]
How to Launch MySQL Database Service ?

 Launching Your First MySQL DB System

Step 1 - Pre-requisites

1.    1.     Create a compartment and user group to organize the resources and access. In this example, we create a compartment named as MySQL_Sandbox, and a group MySQL_Test_Group. Log-in the Console as an Administrator, under the Identity menu, create a MySQL_Sandbox compartment, and a …

[Read more]
How to access MDS by using MySQL Enterprise Workbench

 Using MySQL Enterprise Workbench to write SQL statements against MDS

Assume that you wanted to access/write sql statements on MDS from MySQL Workbench Running on On-premises (Windows OS)

How? Below are steps you needed to follow.

To connect with MySQL Workbench ,you require below details handy :-

Prerequisite:-

1.       Installed MySQL Enterprise Workbench(preferred latest version) On-Premises.

2.       Putty - https://www.putty.org/

3.       Up & Running MDS on ORACLE CLOUD .

4.       Up and Running Compute instance.

 

[Read more]
How to Migrate MySQL from On-premises into MySQL Database Service (MDS) ?

Guide to Migrate Production MySQL Database running on On-premises to Oracle Cloud MySQL Database Service(MDS) ?

I have one production database which i would like to migrate into Oracle Cloud PaaS model i.e MySQL Database Service , we will walk through on how to migrate customerDB database from On-premises to Oracle Cloud MySQL Database Service(MDS).

Note:- Recommended is to have MySQL DB On-Premises and MDS  both must have same version i.e 8.0 and Utility shell MySQL shell must be 8.0.21 onwards.

make sure app is disconnected and not allowing any traffic during the migration process.

We will use two new features introduced with latest release of MySQL 8.0.21.

1.       Dump Schema Utility

a.       This will help us to take the backup from On-promises database and export  to Oracle Cloud Object …

[Read more]
A Step by Step Guide to Take your MySQL Instance to the Cloud

You have a MySQL instance? Great. You want to take it to a cloud? Nothing new. You want to do it fast, minimizing downtime / service outage? “I wish” I hear you say. Pull up a chair. Let’s have a chinwag.

Given the objective above, i.e. “I have a database server on premise and I want the data in the cloud to ‘serve’ my application”, we can go into details:

  • - Export the data - Hopefully make that export find a cloud storage place ‘close’ to the destination (in my case, @OCI of course)
  • - Create my MySQL cloud instance.
  • - import the data into the cloud instance.
  • - Redirect the application to the cloud instance.

All this takes time. With a little preparation we can reduce the outage time down to be ‘just’ the sum of the …

[Read more]
A Step by Step Guide to Take your MySQL Instance to the Cloud

You have a MySQL instance? Great. You want to take it to a cloud? Nothing new. You want to do it fast, minimizing downtime / service outage? “I wish” I hear you say. Pull up a chair. Let’s have a chinwag. Given the objective above, i.e. “I have a database server on premise and I want the data in the...

Show Differences Found by pt-table-checksum

First of all, pt-table-checksum is perfect for checking if the master and its slaves are in-sync. It answers the question “Are the slaves consistent with the master?”. However, if they’re not, pt-table-checksum doesn’t actually tell you what exactly is wrong.

master# pt-table-checksum -q
TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE
09-03T22:21:10 0 1 2 1 0 0.013 mysql.proxies_priv
09-03T22:21:10 0 1 9 1 0 0.010 mysql.user

From pt-table-checksum to pt-table-sync

Nevertheless, pt-table-sync may give you a partial answer. It can print SQL statements to sync the replication cluster. Thus, reading the SQL code, you may guess what records were missing/extra or differ.

master# pt-table-sync --print --replicate percona.checksums localhost
DELETE FROM `mysql`.`proxies_priv` WHERE `host`='slave.box' AND `user`='root' AND `proxied_host`='' AND …
[Read more]
Showing entries 2783 to 2792 of 44045
« 10 Newer Entries | 10 Older Entries »