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 »

How To Update Maximum Number Of Mysql Connections On Linux

There is often necessary to increase the maximum number of MySQL connections in order to prevent “Too Many Connections” error. If you’re on LAMP, you’re welcome to follow one of these ways: For a temporary solution you might want to execute the following query: SET GLOBAL max_connections = 500; This will increase max_connections directive to 500, but will… Read More »

How to Improve MySQL Performance with a Single Line in Config

I have found a way to prevent server overload because of MySQL. The tip seems to be really good, and I am giving the link to the original post. Here it is: Dramatically Improve MySQL Performance In order to make your heavy MySQL servers perform faster all you need is to add a line to your MySQL configuration… Read More »