How to colorize your MySQL or MariaDB client on linux

In this article I present you a config which allows to put the client MySQL / MariaDB in color to facilitate the reading of the results of your SQL queries. Read the post

Use wildcard to grant rights to table with MySQL and MariaDB

The attribution of right in MySQL and MariaDB is sometimes a puzzle especially if one wishes to have a control by table for a user. It is possible to use a wildcard in the Grant command but its syntax is not very explicit. Read the post

Configuration to stop typing MySQL / MariaDB passwords

Have you ever thought about using the .my.cnf configuration file to make it easier to connect to your MySQL or MariaDB databases? This configuration is very useful when you have to manage several databases and / or several servers. I propose you a presentation of what we can do with it in this article. Read the post

Which format use to store dates in database with MySQL / MariaDB?

There are several ways to store dates in database, the choice is not so simple, especially if you need the timezone. In this article I explain the different solutions with their advantages and disadvantages. Read the post

Use linux account to get secure connection to MySQL and MariaBD without password

No need to remember your password to connect to a linux server, SSH keys provide authentication. We can have the same thing on MySQL and MariaDB. With a plugin, the database server trusts the credentials of the linux system, you only need mysql account with the same name as the linux account and the password disappears from the connection. It is ideal on a development server with multiple users and it greatly facilitates the management of accounts, even if we forget to delete the mysql account, deletion of the linux account is enough. Read the post

Apply CI / CD principles to SQL migrations with Jenkins and some bash

Writing unit or functional tests on code has almost become a standard. Having a server that automates the verification of these tests and deploys the code is the goal of many development teams. Despite this, these good practices are rarely implemented for database schema migrations. In this article, I'll show you how with a little bash and Jenkins, I test and automate my SQL migrations. Read the post

Alter table in MySQL and MariaDB without locking table with Percona Toolkit

Alter table operation can be a very long task, depending on your database. It's often that database administrator wait too run these operations and do it late in the night to avoid disturbing user. But solutions exist to allow alter table without locking table, pt-online-schema-change from Percona Toolkit is one of these solutions. Read the post

Handling dates and times in SQL queries with MySQL & MariaDB

Manipulating dates in a programming language (PHP, Java ....) is simple and known to all. But what about in the MySQL database? In this article I present what it is possible to do in SQL queries: operation, date interval ... Read the post

Search