Category Archives: MySQL

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 »

How to Restore a MySQL Database with Linux Shell

Today I will show a simple command that will allow you to restore a database from a previously made sql file. No matter, how the backup was done, if it has sql commands, you will restore it in the fastest possible way. If your database backup file exceeds 10 megabytes, it’ll be very hard to restore it using… Read More »