How to check MySQL version on Mac

Being familiar with the exact version of MySQL running on your system is crucial. It can inform decisions related to compatibility, feature availability, security patches, and more. Here's a straightforward guide for Mac users to determine their MySQL version.

Via the Terminal

If MySQL Is Started:

If MySQL is already running on your Mac, you can simply query the version directly.

  1. Open your Terminal.

  2. Enter the MySQL console:

    mysql -u root -p

    Note: You might need to replace root with your MySQL username. The -p flag prompts you for your password.

  3. Once you're in the MySQL console, run the following command:

    SELECT VERSION();

    The output will show the version of MySQL you're currently using.

Without Starting MySQL:

If you don’t want to start MySQL or log into the console, you can still get the version:

In your Terminal, run:

mysql --version

This command returns information about the MySQL client. The version of the client usually matches that of the server, but do note that it's possible for them to be different if, for example, you've upgraded the client without upgrading the server.

Via System Preferences

If you've installed MySQL using the official MySQL package for macOS, you can check the version through the MySQL pane in System Preferences.

  1. Open System Preferences.
  2. Click on the MySQL icon.
  3. The MySQL version will be displayed in the pane.

Via MySQL Workbench

If you're using MySQL Workbench, an official graphical tool from Oracle, to manage your MySQL databases:

  1. Open MySQL Workbench.
  2. In the Home tab, look at the MySQL Connections section. The version of each connection is usually displayed under its name.
  3. Alternatively, once connected to a database, you can go to the Server menu and select Server Status. The version will be displayed there.

Conclusion

It's always a good idea to know which version of MySQL you're running, especially when planning upgrades or troubleshooting issues. Whether you prefer the terminal, system settings, or a GUI-based approach with MySQL Workbench, macOS offers multiple ways to quickly ascertain this information.

The next generation of charts and BI.

Coming soon.

Fast. Opinionated. Collaborative. Local-first. Keyboard centric.
Crafted to the last pixel. We're looking for early alpha users.