The fastest way to check your MySQL version

The quickest method is to open your command line or terminal and run a single command. If MySQL is installed and running on your computer, type mysql --version and press Enter. The output will show your version number immediately — for example, "mysql Ver 8.0.35 for Linux on x86_64".

This works on Windows, Mac, and Linux. You do not need to be logged into a MySQL database or have any special permissions. The command simply checks what version of the MySQL client software you have installed.

Key Takeaways

  • Run mysql --version from your command line to see your MySQL version in seconds.
  • If that command does not work, MySQL may not be installed or not added to your system path — you may need to navigate to the folder where MySQL lives first.
  • Logging into a MySQL database and running SELECT VERSION(); shows the server version, which may differ from your client version.
  • On Windows, you can also check the version through the MySQL Installer or by looking at the folder name in Program Files.

When the command line method does not work

If you type mysql --version and get an error like "command not found" or "'mysql' is not recognized", MySQL is either not installed or your system does not know where to find it. This is common on Windows and Mac.

On Windows, try navigating to the MySQL installation folder first. Open Command Prompt, then type the full path: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql --version (adjust the version number in the path to match what you see in Program Files). On Mac, if you installed MySQL using Homebrew, try /usr/local/bin/mysql --version.

If you still get an error, MySQL may not be installed on your machine. You can download it from mysql.com or install it through your package manager (Homebrew on Mac, or a package manager on Linux).

Checking the server version when you are logged in

If you are already connected to a MySQL database, you can check the server version from inside MySQL itself. Log in with your username and password, then type SELECT VERSION(); and press Enter. This returns the version of the MySQL server you are connected to.

This is different from the client version you get from mysql --version. The client is the program on your computer that connects to MySQL; the server is the program running the database. They can be different versions, though usually they match. If you are connecting to a remote database, SELECT VERSION(); tells you what version is running on that remote machine.

Checking the version on Windows without the command line

If you prefer not to use the command line, you can find your MySQL version through the MySQL Installer. Open the MySQL Installer application (search for "MySQL Installer" in your Start menu), and it will show all installed MySQL products with their version numbers listed.

You can also navigate to the folder where MySQL is installed. Open File Explorer, go to C:\Program Files\MySQL (or C:\Program Files (x86)\MySQL on some systems), and look at the folder names. The folder will be named something like "MySQL Server 8.0.35", where the numbers are your version.

Understanding version numbers and what they mean

MySQL version numbers follow a pattern: major.minor.patch. For example, in version 8.0.35, the 8 is the major version, 0 is the minor version, and 35 is the patch number. Major versions (like 5.7 versus 8.0) have significant changes and new features. Minor versions add smaller features. Patch versions fix bugs and security issues.

If you are running an older version like 5.7, you may want to check whether your hosting provider or application supports it — MySQL 5.7 reached end of life in October 2023, meaning it no longer receives security updates. Version 8.0 is the current stable version and receives regular updates.

Why knowing your MySQL version matters

Different versions of MySQL support different features and syntax. If you are writing a script or query and it does not work, the version might be the reason. Some applications also require a minimum MySQL version to run — for example, WordPress recommends MySQL 5.7 or higher, though 8.0 is preferred.

If you are setting up a new database or troubleshooting a problem, knowing your version helps you find the right documentation and understand what features are available to you. It also helps when you are asking for help online — telling someone your version number lets them give you more accurate guidance.

Frequently Asked Questions

What if mysql --version shows a different version than SELECT VERSION()?

You have two different versions installed. The mysql --version command shows your client software, while SELECT VERSION(); shows the server. This happens when you update one but not the other. Both should work together, but if they are very far apart in version number, update the older one to avoid compatibility issues.

Can I check the MySQL version on a server I do not have direct access to?

If you have a login to the database, yes — connect and run SELECT VERSION();. If you do not have login access, you cannot check the version directly. Ask your hosting provider or database administrator what version they are running.

Is there a way to check the version in a web browser?

Not directly. A web application running on top of MySQL might display the version on a status page or admin panel, but that depends on how the application is built. You would need command line or database access to check the version yourself.

What should I do if my MySQL version is very old?

Check whether your applications and hosting provider support it. If you are running version 5.5 or 5.6, they no longer receive security updates and you should plan to upgrade. Your hosting provider may offer an upgrade path, or you may need to migrate to a newer version manually.