Before installing an app, check MySQL version details on the server the app will use. The quickest method is to connect to that database and run SELECT VERSION();.

A local command can show the version of your computer's MySQL client instead, which may not match the hosted database. Use the method that fits your setup, then compare the server version with the app's requirements.

Key takeaways

  • Run SELECT VERSION(); in a connected SQL session to get the active server version.
  • mysql --version and mysql -V show the client utility version, not necessarily the database server's.
  • phpMyAdmin and MySQL Workbench can show server details without a terminal command.
  • Check the app's stated database requirements before installation. A version number alone doesn't guarantee compatibility.

Check MySQL version inside a SQL session

If you can connect to the database, a SQL query gives you the most direct answer. Open a client such as MySQL shell, connect to the right server, and run a query at the prompt. To start a local authenticated session, run mysql -u root -p and enter your password.

A desktop monitor displaying blurred code on a desk with a keyboard and small potted plant.

Run the quick version query

Enter SELECT VERSION(); and press Enter. The server returns its version string, for example 5.7.22-standard. You can also run SELECT @@version;, which returns the same kind of value, such as 5.6.34-log.

These queries identify the server you're connected to, not the version of a separate MySQL client installed on your computer. MySQL's query instructions show how to enter SQL statements in the command-line client.

Get edition and platform details

For more context, run SHOW VARIABLES LIKE '%version%';. Along with version, the results can include version_comment, version_compile_machine, version_compile_os, and protocol_version.

version_comment can identify the edition, such as MySQL Community Edition, but it doesn't replace checking the release number against your app's requirements. The compile fields describe the platform the server was built for. See MySQL's reference for the SHOW VARIABLES statement.

Check the version from a command line

Terminal commands are convenient when you have SSH or local server access. Keep in mind that commands can report the version of a client program, a server program, or the running server.

See the client and server versions

On Windows, open Command Prompt and run mysql -V or mysql --version. These commands report the version of the mysql client utility. Linux and macOS terminals support the same uppercase -V and long-form options.

You may see output such as mysql Ver 8.0.xx for Linux on x86_64. The exact wording depends on the installed build. This is not proof that the remote database server is running that version.

Some instructions show lowercase mysql -v on Linux. That flag enables verbose client output, not version information. Use uppercase -V or --version to check the client version.

Check the server binary or connect to the server

If the server binary is installed on the machine, mysqld --version reports its version. mysqld --help also includes version information. These commands can fail if the binary isn't in your system path.

To query a running server, use mysqladmin version. If a password is required, run mysqladmin -u USER -p version and enter the database password when prompted. This returns server details, including its version. By contrast, mysqladmin -V reports the mysqladmin utility's version.

You can also log in with mysql -u root -p. The connection banner includes a Server version: line. Inside the client, type STATUS to see client and server versions, uptime, and connection information.

Find the version in phpMyAdmin or Workbench

A hosting control panel or graphical database tool may be faster than SSH, especially when your database is managed for you.

A row of server racks in a clean data center aisle with one open rack showing hardware and cables.

Use phpMyAdmin in your hosting panel

Open phpMyAdmin from your hosting account and look for Server Version in the Database Server area. On SiteGround, the path is Site Tools > Site > MySQL > phpMyAdmin. The layout can vary by host, but server information is usually shown on the tool's main screen.

For cPanel users, our guide shows how to create a MySQL database and user in cPanel. Use the interface carefully once connected. It can display and change live database data, so stick to the version details unless you intend to make a specific change.

Check MySQL Workbench

In MySQL Workbench, connect to the database, then open Administration > Management > Server Status. Read the version field in the server status view.

This is useful when you already use Workbench to manage a remote database. Make sure the connection is for the same database your app will use. A saved connection to a development server won't tell you the version of a separate production database.

Check installed packages or a Docker database

The right check depends on where the database runs. A hosting account, Linux server, and Docker container can each have different MySQL installations.

Check Debian or Ubuntu packages

On Debian or Ubuntu, run dpkg -l 'mysql-server*' to list installed MySQL server packages. To compare the installed and available package versions, run sudo apt-cache policy mysql-server.

The output includes Installed and Candidate fields. For example, a package version might appear as 8.0.29-0ubuntu0.20.04.3. Package records show what's installed through the system's package manager; if the app connects to another host, query that server directly instead.

Check a MySQL container

For a MySQL database in Docker, replace CONTAINER with the container name and run:

docker exec -it CONTAINER mysqld --version | awk '{print $3}' | cut -d'-' -f1

The pipeline extracts a bare version number from the server binary output. If the container uses a custom image or a different binary layout, the output may need a different parsing command. Running docker exec -it CONTAINER mysqld --version without the pipeline still shows the full binary version string.

Match the version to the app's requirements

Once you have the server version, compare it with the app's installation requirements. Check for a minimum supported MySQL version and notes about specific releases or database features. If the app connects through a hosting account, check that database's version, not just the one on your laptop.

Read the version number and suffix

A MySQL version generally contains a major, minor, and bug-fix number, followed by an optional suffix. For example, in 8.0.29, 8 is the major number, 0 is the minor number, and 29 is the bug-fix release.

Suffixes add release context. dmr means Development Milestone Release, while rc means Release Candidate. These labels indicate development or pre-release stages, so don't assume a larger-looking number is automatically the right choice for a live app.

Consider support as well as compatibility

MySQL 5.7 is an older release line. If an app or host still runs it, check the app's compatibility requirements and the database's support status. If the requirements specify MySQL Community Edition, verify that edition as well as the release. MySQL 8.4 is an LTS release. Oracle's MySQL release policy explains how LTS releases fit into its release model.

Oracle's MySQL announcement listed April 2026 as the scheduled end of life for MySQL 8.0. Its release announcement gives that date. As of November 2026, include the exact 8.0 release and your host's support policy in your compatibility decision.

Frequently asked questions

Is MySQL still used in 2026?

Yes. MySQL remains in active use for websites and applications. Before installing an app, check that its required MySQL release is supported by your hosting environment.

Does MySQL have a server?

Yes. MySQL uses a server to store and manage databases, while client programs connect to it. The server and client can run on the same machine or on separate systems.

Why does mysql --version differ from the database version?

It reports the version of the local mysql client utility. The database may be hosted elsewhere or run a different release. Use SELECT VERSION();, phpMyAdmin's server details, or mysqladmin version to check the connected server.

Can I check the server version without logging in?

You can inspect a local server binary with mysqld --version or check installed packages on Debian and Ubuntu. These checks don't confirm a remote database's version. To check a remote server, use a connected SQL client, phpMyAdmin, Workbench, or mysqladmin version. Connecting with the local client using mysql -u root -p still requires valid credentials.

Can PHP report the server version?

Legacy PHP code using mysql_get_server_info() can return the version from an existing connection, but PHP 7 removed the old mysql extension. Modern PHP code using MySQLi can get server information for a connection with mysqli_get_server_info($connection).

Check the database your app will actually use

The safest version check is the one made against the database your app will connect to. Run SELECT VERSION(); when you can, then match that result to the app's requirements and the server's support status.

If you're choosing a cPanel setup for a new site, ZADiC cPanel hosting starts at $4.99 per month. A compatible database, clear setup steps, and the right hosting environment give your app a much smoother start.

We use cookies so you can have a great experience on our website. View more
Cookies settings
Accept
Decline
Privacy & Cookie policy
Privacy & Cookies policy
Cookie name Active

Who we are

Our website address is: https://zadic.net.

Comments

When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor’s IP address and browser user agent string to help spam detection. An anonymized string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service privacy policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.

Media

If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.

Cookies

If you leave a comment on our site you may opt-in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year. If you visit our login page, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser. When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select "Remember Me", your login will persist for two weeks. If you log out of your account, the login cookies will be removed. If you edit or publish an article, an additional cookie will be saved in your browser. This cookie includes no personal data and simply indicates the post ID of the article you just edited. It expires after 1 day.

Embedded content from other websites

Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website. These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including tracking your interaction with the embedded content if you have an account and are logged in to that website.

Who we share your data with

If you request a password reset, your IP address will be included in the reset email.

How long we retain your data

If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue. For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.

What rights you have over your data

If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.

Where your data is sent

Visitor comments may be checked through an automated spam detection service.
Save settings
Cookies settings