Constraint Checks that actually checked the constraints were
introduced last year with MySQL 8.0.16 and they really do help
you keep bad data out of your database. I have found them
very handy in the past year but today I spotted a question on a
website about how to remove a Constraint Check.
What is a Constraint Check?It is an integrity check. In the
following example a constraint is set up to make sure the calues
of the column 'is' are greater than one hundred.
CREATE TABLE c1 (id INT NOT NULL,
CONSTRAINT id_gt_100 CHECK (('id' >
100))
);
A simple test with a value in range runs perfectly fine.
INSERT INTO c1 (id) VALUES (10000);
Query OK, 1 row affected (0.0037 sec)
But you will receive an error if the value of 'is' is less
than 100.
INSERT INTO c1 (id) …
In systems nowadays, improving security is a must! One of the weakest links in the security system is the user password from where an attacker can enter. In order to improve password strength and security, MySQL provides a plugin called “Validation plugin” which can be configured to enforce a set of rules for passwords.
Installation
The plugin can be enabled by executing the following at runtime:
INSTALL PLUGIN validate_password SONAME 'validate_password.so';
Or by adding the plugin in the configuration file, but this requires bouncing MySQL for it to take effect:
[mysqld] plugin-load-add=validate_password.so
It’s also suggested to add the following variable in my.cnf so that the plugin cannot be removed at runtime (also requires a MySQL bounce to take effect):
[mysqld] validate-password=FORCE_PLUS_PERMANENT
Checking Installation
…[Read more]Percona engineers often need to analyze and review complex SQL database queries. Good formatting can make these SQL queries much easier to understand and work with. Without clear formatting, queries can become confusing and hard to debug.
Online query formatting services provide one set of solutions. Examples are Code Beautify, FreeFormatter, and sqlformat.org. However, many users are not comfortable sharing their queries with third-party services, especially if your SQL code contains confidential information.
This article examines alternatives to online tools for SQL query formatting tools that have been successfully used by Percona engineers. These solutions come in different types:
- Plug-ins to your code editor or …
This session at Percona Live ONLINE was presented by Akshay Suryawanshi, Senior Production Engineer at Shopify, and Jeremy Cole, Senior Staff Production Engineer – Datastores at Shopify.
Shopify is an online and on-premise commerce platform, founded in 2006. Shopify is used by more than a million merchants, and hundreds of billions of dollars of sales have happened on the platform since its inception. The company is a large user of MySQL, and the Black Friday and Cyber Monday weekends are their peak dates during the year, handling hundreds of billions of queries with MySQL. This year’s presentation was an opportunity to talk about the company’s challenges and progress over the last twelve months.
Key Google Cloud concepts from the presentation
As part of the presentation, it’s important to understand the naming conventions that exist around …
[Read more]In this demo we are setting up InnDB Cluster on Kubernetes, we will use a StatefulSets and NFS as storage. This demo was created on Oracle Cloud (OCI) but vanilla Kubernetes and NFS was used so should work for any cloud or on-prem. More information on my github page here Setup NFS Server to act as your persistent volume. Setup a NFS Server for your persistent volumes, howto here If you are using a public cloud provider you can most likely use dynamic storage options for handling of PV. In bellow examples I have a NFS Server on IP: 10.0.0.50 This NFS exposes folders: …
[Read more]With this post we are reaching the end of our journey to HA for WordPress & MySQL 8.0 on OCI.
If you have not read the two previous articles, this is just the right time.
- MySQL 8.0 InnoDB ReplicaSet with WordPress in OCI
- MySQL 8.0 InnoDB ReplicaSet with WordPress in OCI – part II
We started this trip using the MySQL InnoDB ReplicaSet where only 2 servers are sufficient but doesn’t provide automatic fail-over.
In this article we will upgrade our InnoDB ReplicaSet to …
[Read more]In this demo we are setting up one MySQL Server using k8s, we will use a deployment and NFS as storage. This demo was created on Oracle Cloud (OCI), standard Kubernetes and NFS was use so the setup should work for any cloud deployment or on-prem. More information on my github page here Persistent volumes Setup a NFS Server for your persistent volumes, howto here If you are using a public cloud provider you can most likely use dynamic storage options for PV. In bellow examples I have a NFS Server on IP: 10.0.0.50 The NFS exposes folder:
- /var/nfs/pv099
…
[Read more]This article is the second part of our journey to WordPress and MySQL 8.0 High Availability on OCI. The first part can be read here.
We ended part I with one webserver hosting WordPress. This WordPress was connecting locally to MySQL Router using HyperDB add-on. This add-on allows to split the reads & writes on MySQL Servers using replication. And finally we had one MySQL InnoDB ReplicaSet of two members …
[Read more]MySQL, arguably the most popular relational database, is used pretty extensively at the popular professional social network LinkedIn. At Percona Live ONLINE 2020, the company’s flagship event held online for the first time due to the Covid-19 pandemic, Karthik Appigatla from LinkedIN’s database SRE team discussed the company’s approach to securing their database deployment without introducing operational hiccups or adversely affecting performance.
Instead of just performing admin duties, Karthik’s team builds automated tools to scale their infrastructure, and he talked about some of these tailored tools in his presentation. The database SREs on his team also work with the developers at LinkedIn and help them streamline their applications to make best use of the database.
Talking about LinkedIn’s reliance on MySQL, Karthik said that not only do all their infrastructural tools rely on MySQL, many of the internal …
[Read more]MinervaDB Webinar on Data SRE – Building Database Infrastructure for Performance and Reliability
Building database infrastructure for performance and reliability ? This is a definitive webinar for anyone who is interested in building data SRE, Join Shiv Iyer, Founder and Principal of MinervaDB on Friday, 5 June 2020 – 06:00 PM PDT to 06:45 PM PDT , as he discuss about Data SRE best practices and tools. During this webinar he will discus:
- How Data SRE can impact your business?
- Most expensive database outages and how can you address those proactively.
- Data SRE tools and techniques.
- Checklist for building database infrastructure addressing performance, scalability, high availability, reliability, fault-tolerance and security.
- Data SRE future.
- MinervaDB Data SRE best practices.
…
[Read more]