There are many ways to back up a MySQL or MariaDB server. Some ways include using mysqldump, mydumper, LVM Snapshots or XtraBackup. However, any robust backup solution boils down to one key requirement: The ability to restore the databases to a point-in-time. So, for instance, if your server crashes, you would like to be able … Continue reading Simple MySQL / MariaDB Backup
Tag: MySQL
Set up MySQL Replication with Amazon RDS
Problem You have an existing server that runs a MySQL database (either on EC2 or not) and you would like to replicate this server with a Amazon RDS MySQL instance. After you follow the instructions from Amazon, your slave reports the IO status: Slave_IO_State: Connecting to master ... and the replication does not work. Solution … Continue reading Set up MySQL Replication with Amazon RDS
Upgrade MySQL 5.5 to 5.6 on EC2/CentOS/RHEL
Problem You would like to upgrade MySQL 5.5 to MySQL 5.6 on an existing server that uses the YUM software package manager. Solution Just enter the following few simple commands and you should be good to go. But, please, do a thorough full backup of your system before you do the upgrade just in case. … Continue reading Upgrade MySQL 5.5 to 5.6 on EC2/CentOS/RHEL
Delete All Binary Logs for MySQL
Today I discovered that one of my servers mysteriously ran out of disk space. I ran the following Linux command to find all the biggest files and folders on the server: ... and found that it was the binary logs used for MySQL replication that were gobbling up all the disk space: Now I first … Continue reading Delete All Binary Logs for MySQL
MySQL ERROR 2026 (HY000): SSL connection error – Some Troubleshooting Ideas
I just spent a fair amount of time setting up MySQL replication between two servers encrypted by SSL (using MySQL 5.1.73). I struggled with fixing a nasty error displayed only as 'ERROR 2026 (HY000): SSL connection error'. In the following, I have collected a few possible strategies for resolving this error: Is the password for … Continue reading MySQL ERROR 2026 (HY000): SSL connection error – Some Troubleshooting Ideas
Check if MySQL User Exists on Command Line (and in Puppet)
If you are using Linux, there is simple way to check if a user exists in MySQL: echo `mysql -u root -p[your root password] -e 'use mysql; SELECT user FROM user;'` | grep '[user name]' Executing this command will exit with return code 0 if the user exists and otherwise exit with 1. This is very … Continue reading Check if MySQL User Exists on Command Line (and in Puppet)