MySQL User Camp is a forum where MySQL Engineers and community users come together to connect, collaborate, and share knowledge. This year’s first MySQL User Camp was held on 27th April 2018, at Oracle India Pvt Ltd, Kalyani Magnum Infotech Park, Bangalore with an excellent turnout of 60 attendees. The event began with a welcome […]
To support the new feature Partial Update of JSON documents, InnoDB changed the way it stored the large objects (LOBs) in MySQL 8.0. This is because InnoDB does not have a separate JSON data type and stores JSON documents as large objects.…
Generally TPC-C benchmark workload is considered as one of the #1 references for Database OLTP Performance. On the same time, for MySQL users it's often not something which is seen as "the most compelling" for performance evaluations.. -- well, when you're still fighting to scale with your own very simple queries, any good result on something more complex may only look as "fake" ;-)) So, since a long time Sysbench workloads remained (and will remain) as the main #1 "entry ticket" for MySQL evaluation -- the most simple to install, to use, and to point on some sensible issues (if any). Specially that since new Sysbench version 1.0 a lot of improvements were made in Sysbench code itself, it really scales now, has the lowest ever overhead, and also allowing you to add your own test scenario via extended LUA scripts (and again, with lowest ever overhead) -- so, anyone can easily add …
[Read more]This post is about a very simple approach / step-by-step InnoDB log (aka transaction logs)resize, We don’t do this activity regularly but when we have to resize InnoDB log files, there will be a MySQL downtime. This post will be a like a checklist for anyone who want to resize InnoDB log files without any mistakes, We made this task in multiple steps so that you can follow much better:
Step 1 – Check existing logs and their size:
[root@localhost ~]# lsof -c mysqld | grep ib_logfile mysqld 1018 mysql 5uW REG 253,0 50331648 180228 /var/lib/mysql/ib_logfile0 mysqld 1018 mysql 11uW REG 253,0 50331648 180229 /var/lib/mysql/ib_logfile1
Step 2 – Shutdown MySQL
[root@localhost ~]# systemctl stop mysqld [root@localhost ~]# systemctl status mysqld ● mysqld.service - MySQL Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; …[Read more]
Do you want to install MySQL 8.0 on Ubuntu 16.04 LTS? In this quick tutorial, I show you exactly how to do it in five minutes or less.
This tutorial assumes you don’t have MySQL or MariaDB installed. If you do, it’s necessary to uninstall them or follow a slightly more complicated upgrade process (not covered here).
Step 1: Install MySQL APT Repository
Ubuntu 16.04 LTS, also known as Xenial, comes with a choice of MySQL 5.7 and MariaDB 10.0.
If you want to use MySQL 8.0, you need to install the MySQL/Oracle Apt repository first:
wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb dpkg -i mysql-apt-config_0.8.10-1_all.deb
The MySQL APT repository installation package allows you to pick what MySQL version you want to install, as well as if you want access to Preview Versions. …
[Read more]In this post we will discus about the different ways we can purge binary logs safely in MySQL, We recommend you to confirm before purging the binary logs from the master, all logs were applied to the slaves to avoid halting them. The following error is usual when binary log is purged before being applied on slave:
Last_IO_Errno: 1236 Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: ‘Could not open log file’
How can we safely purge MySQL binary log files ?
- On each slave server, use SHOW SLAVE STATUS to check which log file it is reading.
- Get the binary log files details on the master with SHOW BINARY LOGS.
- Check for the earliest log file among all the slaves, This is the target file. If all the slaves are up to date, this is the last log file on the list.
- Make a backup of all log files you are about to delete (We insist …
Historically, Random I/O Reads were always a major PITA
for any OLTP workload.. If Random I/O Writes you could yet
"delay" via controller's caches (or any kind of other
battery-protected caches -- specially if Writes are coming in
bursts), there is no way to "predict" I/O Reads if they are fully
Random (so you cannot "cache" or "prefetch" them ahead and have
to deliver the data directly from storage, read by read.. --
which is hitting a huge "rotation penalty" on HDD).
Indeed, things changed dramatically since arriving of Flash
Storage. You don't need to spend any particular attention if your
I/O Reads are Random or Sequential. However, you still need to
keep in mind to not hit the overall throughout limit of your
Flash Device. As the result, reading by smaller I/O blocks
allowing you to do more I/O operations/sec than with bigger
blocks. And what about InnoDB ? -- InnoDB is using by default
16KB page size (so by default all Random I/O …
There are two simple ways to backup only the users and privileges in MySQL:
1- Using mysqlpump utility (as create user and grant statements):
[shell ~]$ mysqlpump -uUSER -p --exclude-databases=%
--add-drop-user --users >
/tmp/pump-all-users_privileges-timestamp.sql
Dump completed in 1364 milliseconds
Sample output:
[shell ~]$ head
/tmp/pump-all-users_privileges-timestamp.sql
-- Dump created by MySQL pump utility, version: 5.7.21-20, Linux
(x86_64)
-- Dump start time: Sun May 13 23:30:49 2018
-- Server version: 5.7.21
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS,
FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE;
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET …
Hello marceloaltmann,
I am installing McAfee Audit Plugin 1.1.6 in my Centos 7 MySQL
version 5.6.40 followed by all installation instruction given on
Wiki . After all troubleshooting I’m not able to Load Plugin
either my.cnf or INSTALL PLUGIN.
Always getting fail to initialize AUDIT error. Observed in ,MySQL
error log and found “McAfee Audit Plugin: Couldn’t find proper
THD offsets for: 5.6.40”.
We have also extract offset and OFF checksum but not Loaded
plugin.
Please help me….
Most companies make a mistake at the very beginning. They set their system time zone to Eastern, Central, Mountain, or Pacific time. Then, they install their database on it. They use all manner of timestamp and date types and insert terabytes of data. After that, it becomes almost impossible (in terms of being worth the effort) to change it some months or years later when the company has a popular product or service. One of the unfortunate issues that may arise is illegal datetimes.
On Sunday, March 11, 2018, when US time zones switched To daylight savings time, there was no 2AM hour. When we switch back to normal time on Sunday November 4, there will be two 2AM hours.
Inevitably, out of many database servers and many different types of application servers, some data manages to get inserted into MySQL with an illegal datetime during the 2AM hour on the “spring forward” date. Each …
[Read more]