How to Check and Upgrade Your MySQL Version Easily (2023)

Your database more than likely runs on MySQL or its fully open-source fork MariaDB. These popular database management software power 90% of websites, so your server host has probably installed either of them for you.

But not all hosts will continue to keep it up to date, so it’s often up to you to check your MySQL version and keep it upgraded. Outdated software on your server is never good and can also be harmful.

Let’s learn how to check if your MySQL version is up to date, and upgrade it if it isn’t.

Watch Our Video Guide to Checking and Upgrading Your MySQL Version

Why Keep MySQL Up to Date?

Manual server maintenance is not a fun task, especially if you’re not very familiar with your webserver’s inner workings. As long as your server and database are working fine, it may be tempting to ignore an outdated piece of software. But there are quite a few reasons why this is a bad idea.

It’s never good to have outdated software on your server. Even the tiniest hole in your security could be a vector for attackers to slip through and take over.

They may even be able to mess with your database. All sorts of important info are stored there, such as your WordPress posts and all other kinds of sensitive bits. You don’t want anyone unwanted to be able to modify that.

Besides that, a new version means new features and general improvements for what’s already there. Even if these extra features don’t affect you, more recent MySQL versions are more secure, better optimized, and faster.

How to Check and Upgrade Your MySQL Version Easily (1)

And with every update of MySQL comes a whole slew of bug fixes, patching up errors that could be an annoyance at best or cause you serious trouble at worst.

When it comes to any software on your website, it’s almost always best to keep it at the latest version.

Which Version of MySQL is the Best?

Many servers these days are still running on MySQL 5.7 (the latest version before the jump to 8.0), even though a newer and better version exists. Why is this? And which is best, MySQL 5.7 or 8.0?

Most people don’t upgrade because either they don’t know about the latest MySQL version, or they don’t want to take the time to update it. In addition, 5.7 has not been deprecated and will not be until 2023.

How to Check and Upgrade Your MySQL Version Easily (2)

But while MySQL 5.7 is still supported, making the switch to the latest version is definitely worth your time. It’s faster and more secure — changes can be observed instantly upon activating it. And for developers who can make use of the new functions, the benefits are more numerous than can be quickly listed.

There are some upgrade considerations and backward incompatibilities you’ll need to know about, but for a majority of sites, they won’t cause issues.

(Video) How to Check and Upgrade Your MySQL Version Easily

It’s almost always best to keep up with the latest stable version of MySQL. Even minor updates are worth the trouble, though the new built-in auto-updater will likely handle those for you. As for major updates, it’s worth it unless crucial parts of your server are incompatible.

While WordPress supports MySQL versions all the way back to 5.6, 8.0 works perfectly with it. And as 5.6 is no longer supported and is susceptible to bugs and security risks, you should at least update to 5.7.

How to Check MySQL Version

It’s crucial to keep MySQL up to date, but you need to know its version before upgrading. Chances are, you’re already using the latest version and don’t need to do anything at all. There are several ways to check; these are just a handful of the easiest ones.

Check MySQL Version with MyKinsta

Accessing your database and checking your MySQL version with MyKinsta is very easy. There are several ways to do so, as detailed above, but the easiest two are using phpMyAdmin or connecting with the command line.

You can find phpMyAdmin after logging into MyKinsta. Just go to Sites > Info, and under the Database access section, click Open phpMyAdmin. The credentials you need to log in are right there.

You can also connect with the command line with SSH. With Kinsta, we set up everything for you to allow SSH access. Just find your credentials in Sites > Info in the SFTP/SSH section. Then follow the steps below to log in and put in the proper commands.

Use the Command Line

The easiest way to obtain your MySQL version is with a simple code submitted through the command line. It takes mere seconds and answers your question instantly. Getting at your server’s command line shouldn’t be too difficult unless you’re using minimal hosting.

There are a variety of ways to access your server’s command line. For example, your web host may provide a way to submit commands through their back end, such as with cPanel. Or you may be able to use the built-in Terminal or Command Prompt to connect to your server. Tools like PuTTY also exist to help you log in and are usually required for Windows users to connect with SSH.

Either way, you’ll need some SSH login credentials. You can usually find them in your web hosting dashboard, or you can email them and ask for help.

Once you know how you’re going to connect to your server’s command line, follow these steps.

Step 1: Launch the Terminal (Linux, macOS) or Command Prompt/PuTTY (Windows) on your computer. In cPanel, you can find it under Advanced > Terminal.

How to Check and Upgrade Your MySQL Version Easily (3)

Step 2: Provide your SSH credentials to connect and log in to the server.

Step 3: Input the following command:

(Video) MySQL Server Upgradation(2021)|Complete Instructions How to Upgrade MySQL to 8.0.23

mysql -V

If you have the MySQL Shell installed, you can also use the simple command “mysql” to show your version information.

Either way, the version number should be output on the screen.

Check MySQL Version with phpMyAdmin

There’s another straightforward way to check your MySQL version, and that’s with phpMyAdmin. This software is also ubiquitous and present on most servers, so you have a good shot at finding your MySQL version.

Find your phpMyAdmin credentials by checking your web hosting dashboard. There may even be a direct link to log in there. Email your host if you can’t find them.

Log in to phpMyAdmin once you find your credentials. As soon as you’re in, you’ll see a Database server box on the right side of the screen. There, under the Software version section, is your MySQL version. Easy as that!

How to Check and Upgrade Your MySQL Version Easily (4)

Through WordPress Dashboard

A final easy way to find your MySQL version is through your site’s WordPress admin dashboard.

To do that, visit your WordPress dashboard, and go to Tools >Site Health. Under here, first, go to the Info tab, and then to the Database section below.

You can find your server’s current MySQL version listed here beside theServer version label.

How to Check and Upgrade Your MySQL Version Easily (5)

How to Upgrade MySQL Version

If you’ve determined your MySQL is out of date, you should rectify that as soon as possible. There are multiple ways to update MySQL to the latest versions; it all depends on what tools and operating systems you’re using.

It’s worth noting that later versions of MySQL will attempt to auto-update if the script notices that your installation is out of date. You may not need to do anything at all. If you’ve determined that MySQL is out of date and needs to be manually updated, follow these steps.

Like checking your MySQL version with the command line, you’ll need to obtain your SSH login credentials from your web host to access the terminal on your server. And, of course, you’ll need the IP address of your server.

This backup contains both your database (an SQL file) and your entire site, so you’ll be extra safe if something goes wrong.

Upgrade MySQL Using cPanel

If your host offers cPanel, it’s probably the easiest way to do an upgrade since you can use the interface provided. But since cPanel defaults to MySQL 5.7 by default, you may want to do an upgrade.

(Video) How to Upgrade Latest Version of MySQL (MariaDB) in XAMPP Server

As cPanel doesn’t allow you to downgrade, you should back up your database before proceeding.

Most cPanel installations come with Web Host Manager, WHM, which gives you deeper root access.

Step 1: Log into WHM by visiting either “” or “” You can also ask your web host how to access WHM.

Step 2: Navigate to Software > MySQL Upgrade or type “MySQL” into the search bar. You may also find it under SQL Services > MySQL/MariaDB Upgrade.

Step 3: Select the version of MySQL you want to upgrade to and click Next. Now follow the upgrade steps, and it’ll take care of everything for you.

How to Check and Upgrade Your MySQL Version Easily (6)

This method is by far the simplest way to do a MySQL upgrade, but if your host doesn’t offer cPanel or WHM, you may need to do it manually.

Upgrade MySQL in Linux/Ubuntu

There are a variety of Linux distributions, but Ubuntu is by far the most common. These instructions should work for any operating system that uses the apt/apt-get function to install the software.

How to Check and Upgrade Your MySQL Version Easily (7)

Linux can easily SSH connect without any additional software requirements. So, you can get right into your server.

Step 1: Launch the Terminal. Obtain your SSH credentials and use the ssh command to log in.

Step 2: You should have the MySQL apt Repository installed since MySQL is already on your server. Update your package list with the following command:

sudo apt-get update

Step 3: Now upgrade MySQL.

sudo apt-get upgrade mysql-server

You can also try this command if the above doesn’t work:

sudo apt-get install mysql-server

It’ll prompt you to choose a version; select 5.7 or 8.0. If you’re upgrading from 5.6, you should update to 5.7 first, rather than going straight to 8.0.

(Video) How to install MySQL 8.0.32 Server and Workbench latest version on Windows 10

Upgrade MySQL on macOS

While macOS comes with its own version of MySQL, you can’t upgrade it through the usual methods. And most likely, your server is using a separate instance.

Many of these steps are very similar to updating MySQL on Linux. macOS similarly has SSH built into the operating system, so all you need to do is run the commands.

We’ll assume you’re using Homebrew as a package manager as it’s the simplest way to install and update MySQL on Mac. You shouldn’t attempt to upgrade MySQL with Homebrew if you didn’t use it to install it initially.

How to Check and Upgrade Your MySQL Version Easily (8)

Step 1: Launch the Terminal program and log in with the ssh command.

Step 2: Run these commands using Homebrew.

brew updatebrew install mysql

This command should automatically install 8.0 and upgrade any existing versions.

Are you running into trouble? Try uninstalling the current version of MySQL first. Use these commands:

brew remove mysqlbrew cleanup

Then you can again attempt to run the update and install commands again.

Step 3: Make sure you start the MySQL server again manually:

mysql.server start

Upgrade MySQL in Windows

Unlike Mac and Linux, Windows can’t use SSH by default. Instead, you’ll need to install a separate client, and then you can connect to your server.

Step 1: Download PuTTY and install it on your system. Launch it and input your SSH credentials to connect to the server. 3306 is the default port number. Ignore any security alerts; these are normal.

Step 2: Assuming you’re connecting to a Linux terminal, you can use the Linux commands in the Linux/Ubuntu section above to perform the upgrade.

You can also use the MySQL installer to download MySQL onto the system directly. This process skips the SSH connection entirely.

(Video) How to check the MySQL version ? | MySQL Tutorials | KK JavaTutorials


With any software, it’s crucial to keep it up to date. And with MySQL being so integral to your website and its database, it’s even more imperative. Unfortunately, too many web admins choose to let their MySQL version fall behind, to the detriment of their website’s speed and security.

Luckily, checking your MySQL version and upgrading it is almost always a smooth process. While you should definitely back up your website and database for emergencies, you aren’t likely to experience any issues.

With just a tiny command in your web server’s terminal, your database will be well optimized and faster than ever.


How do I upgrade my MySQL version? ›

Step 2: Navigate to Software > MySQL Upgrade or type “MySQL” into the search bar. You may also find it under SQL Services > MySQL/MariaDB Upgrade. Step 3: Select the version of MySQL you want to upgrade to and click Next. Now follow the upgrade steps, and it'll take care of everything for you.

How do I check MySQL version? ›

To check the version your MySQL is running, type and execute mysql -V (note the uppercase V) in the command line. As you can see, the MySQL version for this system is 10.4.

How do I upgrade MySQL 5.7 to 8 in Windows? ›

Download the latest Windows ZIP Archive distribution of MySQL from
  1. If the server is running, stop it. ...
  2. Extract the ZIP archive. ...
  3. Restart the server. ...
  4. Prior to MySQL 8.0. ...
  5. If you encounter errors, see Section 2.3.

Which version of MySQL should I use? ›

We recommend using the most recent GA release. The naming scheme in MySQL 8.0 uses release names that consist of three numbers and an optional suffix (for example, mysql-8.0.

How do I update MySQL on Windows? ›

Upgrading MySQL with Installer
  1. Start the MySQL installer.
  2. From dashboard, click on 'Catalog', which will download the latest changes that would have occurred in catalog.
  3. The server that has been installed can be upgraded only if the dashboard displays an arrow next to the version number of the server.
Mar 8, 2021

How can check SQL version from command line? ›

Use the following steps from the command prompt to determine what version of SQL you are running. On the workstation that SQL is installed, choose Start > Run, and enter cmd in the Open field, and then press Enter to launch a command prompt window. Type select @@version and press Enter.

How to check MySQL database command? ›

MySQL SHOW DATABASES command to get list of databases. Run the following query to show list of databases: SHOW DATABASES; You can run this statement from MySQL Command Line Client, MySQL Shell, as well as from any GUI tool that supports SQL—for example, dbForge Studio for MySQL.

How to upgrade MySQL from 5 to 8? ›

In-Place Upgrade is a Go

All you need to do is to run apt upgrade or yum update and you are all set. The upgrade is even more convenient – in the past one had to keep in mind to run mysql_upgrade to ensure all system tables are properly upgraded to the format required by the new version of MySQL.

Should I use MySQL 5.7 or 8? ›

MySQL 8.0 should perform better and shows to be more efficient during benchmarking. It performs very well for read/write Workload versus MySQL 5.7. There's no reason not to use MySQL 8.0 if you're able to upgrade. Please see the following documentation for an in-depth look into MySQL 8.0.

How to install MySQL 8.0 18? ›

  1. Step 1: Enable MySQL Repositories.
  2. Step 2: Install MySQL Repositories.
  3. Step 3: Refresh the Repositories.
  4. Step 4: Install MySQL.
  5. Step 5: Set up MySQL Security. Validate Password Plugin. Change Root Password. Configure MySQL Security.
  6. Step 6: Start, Stop, or Check Status of MySQL Service.
  7. Step 7: Launch MySQL to Enter Commands.
Dec 12, 2018

How to check MySQL version command Windows? ›

Check MySQL Version with V Command

The command mysql –V is not OS specific. This command works on Windows, OS X, and Linux distributions including Ubuntu. The MySQL client version in the example above is 10.4.

How to check MySQL version and port? ›

If you are using Windows, you can look for the MySQL port number in the settings file:
  1. Navigate to the "my. ini" file. It will be located in the MySQL installation directory, e.g. C:\Program Files\MySQL\MySQL Server 8.0\.
  2. Open the. ini configuration file with Notepad.
  3. Find the MySQL port that is listening on Windows.

Is MySQL 5.7 end of life? ›

Oracle's MySQL 5.7 has had a good, long run, but the official End of Life is October of 2023. The Era of MySQL 5. x will be over, and only MySQL 8.0 will be officially supported.

Should I install 32 or 64-bit MySQL? ›

You can avoid any compatibility problems with MySQL Workbench by only using the 64-bit version of the server. MySQL Installer is 32-bit but will install both 32 bit and 64-bit binaries.

What are the 3 categories of MySQL? ›

The data type is a guideline for SQL to understand what type of data is expected inside of each column, and it also identifies how SQL will interact with the stored data. In MySQL there are three main data types: string, numeric, and date and time.

What are MySQL admin commands? ›

Administrative MySQL Command

USE Databasename − This will be used to select a database in the MySQL workarea. SHOW DATABASES − Lists out the databases that are accessible by the MySQL DBMS. SHOW TABLES − Shows the tables in the database once a database has been selected with the use command.

What is the latest version of SQL? ›

The current version is Microsoft SQL Server 2022, released November 16, 2022. The RTM version is 16.0. 1000.6.

How to check system version command line? ›

At the Command Prompt or PowerShell, type "slmgr /dlv", and then press ENTER. The /dlv command displays the detailed licensing information.

How to check MySQL version in SQL Server Management Studio? ›


Use the SELECT VERSION() command in the MySQL database client to check the MySQL version. SELECT version(); Here is the output. You can also use the following query to check the MySQL version.

How to check MySQL path in cmd? ›

  1. Press win + r.
  2. Enter services. msc.
  3. Find the service named MySQL in the list.
  4. Right-click on it and select Properties.
  5. The Path to the executable field will contain the path to the directory you need.

How to check MySQL user and database? ›

Use the following query to show MySQL users created in the database server: SELECT user FROM mysql. user; As a result, you will see the list of all the users that have been created in MySQL.

How to run MySQL in cmd? ›

Launch the MySQL Command-Line Client. To launch the client, enter the following command in a Command Prompt window: mysql -u root -p . The -p option is needed only if a root password is defined for MySQL. Enter the password when prompted.

How to update MySQL from 5.7 to 8? ›

  1. Take the Full backup of the MySQL server.
  2. Check the current MySQL version.
  3. Check for the latest available MySQL version.
  4. Install mysql-shell utility.
  5. Run MySQL Upgrade Checker.
  6. Remove MySQL 5 Yum Repository and Install MySql 8 Yum Repository.
  7. Stop MySQL Server.
  8. Run YUM update command to update new binaries.
Aug 11, 2022

How to upgrade minor version in MySQL? ›

To upgrade your Portal database from MySQL Version 8.0.22 to 8.0.26:
  1. Stop your running Portal on the swarm manager node: ...
  2. Use SSH to connect to your MySQL 8.0.22 server. ...
  3. Disable all Yum repositories in the MySQL repository file: ...
  4. Install MySQL 8.0.26 via Yum: ...
  5. Restart MySQL:
Nov 30, 2022

What is the difference between MySQL and MySQL 8? ›

MySQL 8.0 increases the overall reliability of MySQL because : MySQL 8.0 stores its meta-data into InnoDB, a proven transactional storage engine. System tables such as Users and Privileges as well as Data Dictionary tables now reside in InnoDB. MySQL 8.0 eliminates one source of potential inconsistency.

How much RAM is needed for MySQL 8? ›

The default configuration is designed to permit a MySQL server to start on a virtual machine that has approximately 512MB of RAM. You can improve MySQL performance by increasing the values of certain cache and buffer-related system variables.

Is MySQL 8 faster than MySQL 5? ›

When number of threads goes up, MySQL 8.0 significantly outperforms MySQL 5.7! Both versions do not have any specific config changes, but only the notable variables I have set. So both versions are pretty much using default values.

How to install MySQL 8.0 17? ›

  1. Go to "Downloads" ⇒ Double-click " . ...
  2. Double-click the " . ...
  3. In "Introduction", click "Continue".
  4. In "License", choose "Agree".
  5. In "Installation Type", click "Install".
  6. In "Configuration", choose "Use Strong Password Encryption", and enter a password for the "root" user. ...
  7. MySQL will be installed in " /usr/local/ mysql ".

How to install MySQL 5.7 17? ›

Step 1: Add the MySQL 5.7 APT Repository
  1. 1.1 Download the MySQL repository by executing the following command:
  2. 1.2 After the MySQL package has been successfully downloaded, install it:
  3. 1.3 Next, select Ubuntu Bionic.
  4. 1.4 Next, update the APT repository:
  5. 1.5 Then execute the apt update again:

How do I install the latest version of MySQL on Windows 10? ›

How to Install MySQL on Windows 10
  1. Group Replication: Select Standalone MySQL Server / Classic MySQL Replication.
  2. Type and Networking: Select the default Config Type Development Computer, which will set things up for you to work locally.
  3. Authentication Method*: Select Use Strong Password Encryption for Authentication.
Apr 17, 2021

How to upgrade and downgrade in MySQL? ›

How to do it...
  1. Shut down the old MySQL version.
  2. Replace the MySQL 8.0 binaries or older binaries.
  3. Restart MySQL on the existing data directory.
  4. Run the mysql_upgrade utility.

Can I upgrade MySQL 5.1 to 8? ›

Success, MySQL has been upgraded from 5.1 to 8.0. 14! The last test is to see if it works is to attempt to connect using MySQL Workbench - which it does, so that's the upgrade from a five year old version of MySQL to the most recent version available - release three days ago - done!

How to update MySQL in Windows? ›

Upgrading MySQL with Installer
  1. Start the MySQL installer.
  2. From dashboard, click on 'Catalog', which will download the latest changes that would have occurred in catalog.
  3. The server that has been installed can be upgraded only if the dashboard displays an arrow next to the version number of the server.
Mar 8, 2021

How to install MySQL through command prompt? ›

Launch the MySQL Command-Line Client. To launch the client, enter the following command in a Command Prompt window: mysql -u root -p . The -p option is needed only if a root password is defined for MySQL. Enter the password when prompted.

How to install MySQL step by step? ›

  1. MySQL Installer makes it easy to install MySQL with the help of the wizard. ...
  2. Step 1: Go to the official website of MySQL and scroll down. ...
  3. Step 2: After that, you will see two options to Download. ...
  4. Step 3: Once, you click on Download, you will be redirected to the following page:
Mar 9, 2023

How to upgrade MySQL database without downtime? ›

Zero-Downtime Upgrade Steps
  1. Pick a replica node and shun it, and take all replication offline.
  2. Upgrade the MySQL Server on that node.
  3. Bring up replication and verify health.
  4. Welcome the replica node back into the cluster.
  5. Repeat for the other Replica node.
  6. Perform a switch of the Primary to one of the upgraded Replicas.
Jun 28, 2022

How to downgrade MySQL 8.0 32 to 8.0 31? ›

How to Downgrade MySQL 8.0 on Windows
  1. Step 1: Uninstall MySQL 8.0. ...
  2. Step 2: Download the Older Version of MySQL. ...
  3. Step 3: Install the Older Version of MySQL. ...
  4. Step 4: Restore Data. ...
  5. Step 5: Update Your Applications. ...
  6. Step 1: Uninstall MySQL 8.0. ...
  7. Step 2: Download the Older Version of MySQL. ...
  8. Step 3: Install the Older Version of MySQL.
Jan 25, 2023


1. MySQL Server InPlace Upgrade MySQL 5.7 to MySQL 8.0 for Beginners
(Mr Venkat 369)
2. Complete Instructions How to Upgrade MySQL 5.1 to 5.5 to 5.6 to 5.7
3. How to Check the MySQL Version
4. Upgrade Amazon Aurora MySQL Version 1 (with MySQL 5.6 Compatibility) | Amazon Web Services
(Amazon Web Services)
5. How to install MySQL 8.0.30 Server and Workbench latest version on Windows 10
(Amit Thinks)
6. How to install MySQL 8.0.31 Server and Workbench latest version on Windows 11
(Amit Thinks)


Top Articles
Latest Posts
Article information

Author: Pres. Carey Rath

Last Updated: 10/11/2023

Views: 5641

Rating: 4 / 5 (41 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Pres. Carey Rath

Birthday: 1997-03-06

Address: 14955 Ledner Trail, East Rodrickfort, NE 85127-8369

Phone: +18682428114917

Job: National Technology Representative

Hobby: Sand art, Drama, Web surfing, Cycling, Brazilian jiu-jitsu, Leather crafting, Creative writing

Introduction: My name is Pres. Carey Rath, I am a faithful, funny, vast, joyous, lively, brave, glamorous person who loves writing and wants to share my knowledge and understanding with you.