Category Archives: MySQL

Couldn’t execute ‘SHOW VARIABLES LIKE ‘gtid\_mode”: Table ‘performance_schema.session_variables’ doesn’t exist (1146) – How to Fix

This issue is related to MySQL upgrade, when some table data was not updated to new format. When you try to run mysqldump or any other command, you can get this error. So let’s fix it, you’ll need root access or any other account with same privileges (if you are using Directadmin, this user might be da_admin). First,… Read More »

How to Update MySQL to Version 5.7 on a Directadmin Server

If you have a Directadmin server, you know that you can’t simply install new server software without custombuild. Of course, you can, but it will take too much time to set everything up. So let’s talk about MySQL update. cd /usr/local/directadmin/custombuild; ./build set mysql 5.7; ./build set mysql_inst mysql; ./build set mysql_backup yes; ./build update When it’s done,… Read More »

SQL Command to Change Column Order in a MySQL Table

Sometimes you need to change column order in a table. If you don’t have access to latest phpmyadmin version (4.0 and above), you don’t have any graphic solution to do this and you’ll have to use an SQL query. First of all, you need to identify the type of field you want to move. It should look like… Read More »

mysql_secure_installation – You Must Run it After MySQL Server Setup!

After a fresh MySQL server setup I always run mysql_secure_installation script.  It allows to tune several settings, related to MySQL security and it is strongly recommended for running on every server. Let me show you the output of this command and explain some steps that are performed. [root@hosted-by checkers]# mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS… Read More »