MySQL is the most popular database server used by websites to store their important data. In addition to using phpMyAdmin ...
The post How to Manage MySQL Databases and Users from the Command Line appeared first on RoseHosting.
MySQL is the most popular database server used by websites to store their important data. In addition to using phpMyAdmin ...
The post How to Manage MySQL Databases and Users from the Command Line appeared first on RoseHosting.
We know that SQL statement compatibility can change with major database version upgrades and that you should adequately test for them. But what about minor version upgrades?
It is dangerous to assume that your existing SQL statements work with a minor update, especially when using an augmented version of an open-source database such as a cloud provider that may not be as transparent about all changes.
While I have always found reading the release notes an important step in architectural principles over the decades, many organizations skip over this principle and get caught off guard when there are no dedicated DBAs and architects in the engineering workforce.
Real-world examples of minor version upgrade issues
Here are two real-world situations common in the AWS RDS ecosystem using MySQL.
MySQL warnings are an anti-pattern when it comes to maintaining data integrity. When the information retrieved from a database does not match what was entered, and this is not identified immediately, this can be permanently lost.
MySQL by default for several decades until the most recent versions enabled you to insert incorrect data, or insert data that was then truncated, or other patterns that resulted in failed data integrity. Very few applications considered handling warnings as errors, and there is a generation of software products that have never informed the developers that warnings were occurring.
The most simplest example is:
CREATE SCHEMA IF NOT EXISTS warnings; USE warnings; CREATE TABLE short_name( id INT UNSIGNED NOT NULL AUTO_INCREMENT, name VARCHAR(20) NOT NULL, PRIMARY KEY(id) ); INSERT INTO short_name (name) VALUES ('This name is too long and will get truncated'); ERROR 1406 (22001): Data too long for …[Read more]
In a recent podcast on Mastering EOL Migrations: Lessons learned from MySQL 5.7 to 8.0 I discuss with my colleague Adam North not only the technical issues that become a major migration but also key business and management requirements with having a well-articulated strategy that covers:
Having a plan is key to any significant task including data migrations. You should heed the warnings and the deprecations and consider all potential downstream product impacts such as connector upgrades. The plan includes a timeline but also needs to define all the stakeholders both technical and business, the definition of a successful migration, and most importantly the decision tree for a non-successful migration that would …
[Read more]Over 15 years ago, GitHub started as a Ruby on Rails application with a single MySQL database. Since then, GitHub has evolved its MySQL architecture to meet the scaling and resiliency needs of the platform—including building for high availability, implementing testing automation, and partitioning the data. Today, MySQL remains a core part of GitHub’s infrastructure and our relational database of choice.
This is the story of how we upgraded our fleet of 1200+ MySQL hosts to 8.0. Upgrading the fleet with no impact to our Service Level Objectives (SLO) was no small feat–planning, testing and the upgrade itself took over a year and …
[Read more]In this tutorial, we’ll be going over every step of how to install MySQL on AlmaLinux. Database servers are the ...
The post How to Install MySQL on AlmaLinux appeared first on RoseHosting.
In this blog post, we are going to show you how to fix corrupted tables in MySQL. MySQL is an ...
The post How To Fix Corrupted Tables in MySQL appeared first on RoseHosting.
In this blog post, we will show you ten useful mysqladmin commands for database administration. Mysqladmin is a client for ...
The post 10 Useful mysqladmin Commands for Database Administration appeared first on RoseHosting.
I’ve had this list on a post-it note on my monitor for all of 2022. I figured it was time to write it down, and reuse the space.
In summary, AWS suffers from the same problem that almost every other product does. It sacrifices improved security for backward compatibility of functionality. IMO this is not in the best practices of a data ecosystem that is under constant attack.
The uuid()
function in MySQL returns a 36 character
hex string, formatted as:
aa479ea9-1d9d-11ed-ba03-564760fe47b7
ColdFusion's createUUID()
function returns a 35
character hex string formatted as:
AA479EA9-1D9D-11ED-BA03564760FE47B7
Both store the same amount of data (16 bytes), the only difference is that there is an extra dash in the MySQL uuid() function result.
Here's some SQL I came up with to create a UUID using ColdFusion's formatting in raw SQL:
SELECT upper(concat(left(uuid(), 23), right(uuid(), 12)))
It is not an ideal solution because I am actually calling
uuid()
twice, but it is sufficient for my use case.
You could probably use a regex to remove the extra dash and avoid
calling uuid twice if you wanted to try and optimize it. Feel
free to post a comment if you can come up with a better way to do
it.
Now suppose you want …
[Read more]