MySQL is one of those programs that we often find included in hosting packages. In fact, when choosing hosting for our site, we see indicated MySQL version X.XX.XX or something similar. But then what is MySQL and why is it so important to know the installed MySQL version? In the following lines, you will discover everything you need to know about MySQL and find all the steps to update it to the latest version.
Table of contents
What is MySQL?
MySQL is a database and one of the most used in the world. In the case of a WordPress site, it is the section where all the site’s contents and configurations are saved and it is extremely important to keep it updated and performant because otherwise, everything else on the site would be affected. Therefore, one should keep an eye on the MySQL version to ensure it is always up-to-date.
What is the MySQL version?
When discussing a software version, one refers to a string that identifies the software at a certain point in time. Usually, versions are orderable by version. Like all other software, MySQL also has a version, typically structured as a series of numbers that allow you to distinguish and chronological order them. For MySQL, the version is structured as X.X.X where X is a number. The actual meaning of these three numbers is not important but it is useful to know that:
- if the first number changes the update is very important and very influential on the system and the update may have issues;
- if the second number changes the update is minor and adds a small modification or a new feature;
- if the third number changes the update does not change the features it removes only one or more bugs.
Why is it so important to know the version?
Knowing which version you have allows you, after a comparison with the latest version, to know if your database is up-to-date and permits you to easily find out what has changed between the two versions through the documentation.
For example, seeing only a change in the third number can mean that, as written in the code, the version is a bugfix and there’s no need to delve into the documentation.
Thanks to the version number it is therefore possible to check and decide if it is possible to perform a MySQL update or it helps you go to the documentation for other useful information to solve any potential issues.
It follows that it is evident the importance of knowing which version of MySQL you have on your server or hosting.
How do I see which version of MySQL is installed?
There are many ways to know which version of MySQL is installed. Usually these methods depend on the programs that use MySQL or the hosting services. Usually the methods listed below are the most common for obtaining the MySQL version even though there are many others:
- via commands;
- via applications;
- The hosting itself tells me.
Let’s take a detailed look at some of the most common methods for reading the version.
I see it from console
Giving the command directly on the server terminal is possible to get the database version from the database itself.
Indeed launching MySQL -V the terminal will return to screen the version of MySQL with other information that we do not need now.
This method, however, obliges us to have access to the server command console and often, especially in hosting situations, this is not possible.
I see it from PhpMyAdmin
Having access to a PhpMyAdmin instance, it is possible to see which version of MySQL is installed. In fact, once logged in, the dashboard allows you to find database information along with some metrics. Among these, it is possible to find the MySQL version along with the database status information (number of current connections, failed connections, etc…) as well as information about the server on which it is installed.
I see it from WordPress
Inside WordPress, it is possible to see the status of the database in the site’s health-check section. Here you can find messages regarding the database status and its update status.
Tecnicamente per avere l’effettiva versione (la stringa) bisogna installare un plugin che torni la stringa stessa però è comunque possibile sapere se MySQL è aggiornato o meno o se ci sono altri problemi legati al database.
Me lo dice il mio hosting
If I am on a hosting, it is indifferent whether it is managed or not, it is surely indicated in the administration panel or available information or it is still possible to obtain the version by directly asking them.
Try Hosting4Agency on a site of your choice for 30 days and compare the performance before/after the trial period!
How do I know if I need to update MySQL
Apart from WordPress, in all other cases it is necessary to take a second step to see if the own version of MySQL is up to date or not. One must check on the MySQL website which is the last published version and whether the version we are using is still maintained and therefore how dangerous it is to have this version installed.
What is the latest version of MySQL
There is no “final version” of MySQL, because there are always two of “latest” versions. Usually one stable, maintained and the previous, stable, maintained but with a shorter lifecycle defined as End of Support. So one must be careful what is being checked.
Let’s give an example: I have the database at MySQL 5.7.15.
The supported versions (at the time of writing this article) are all those 5.7.x (which will die in October 2023) and all the 8.0.x (which will die in April 2026). So we have an “old” version but maintained, therefore still secure, although we need to plan the update so that by at least August 2023 it has been upgraded to at least MySQL 8.0.
Looking at all the numbers in the version I see that mine is not the latest of 5.7. Indeed, the last version is 5.7.36 while I am running 5.7.15. This means that there are minor fixes that can be installed and should not be dangerous and therefore an upgrade to the updated version of 5.7.36 should be evaluated at least.
How to Update MySQL
The most important and delicate part of the entire process. In the simplest cases, you just need to press a button in a GUI or launch a command from the terminal.
In the worst cases everything has to be done manually. In this case, after a backup one has to start seeing the steps that are needed.
Bisogna infatti andare nella documentazione ufficiale nella documentazione dedicata alla versione specifica di MySQL e seguire le operazioni indicate (ad esempio queste).
For how MySQL updates work, a precise order of intermediate update steps must be followed, otherwise there may be issues with the data.
Final evaluations on the MySQL update
Keeping your database up to date is as important as it is delicate. In a way, it’s like having to take care of a real “living creature”.
This is actually true not only for MySQL but for everything related to the management of one or more websites. This is why keeping everything under control on your own can lead in the long term to an increase in stress, loss of time, and consequently poor management.
Delegating the monitoring of your websites to experts instead can turn out to be the best path to take, as it will allow you to gain in service quality and optimizations for your specific needs, besides having the guarantee of always keeping every component of your websites up-to-date, including of course also MySQL.
If you have never approached a agency that deals with these services or simply want to know more about how we can help you make your work much more simple and free from any type of hassle, take a look at our custom solutions.
We will keep your websites always protected, fast and up-to-date! And to verify it with your own eyes, all you need to do is request a free trial.
If updating MySQL seems like a complex mystery, leave it to us and keep your database at the forefront without stress!