Check MySQL Version in macOS

In this tutorial, we aim to explore how to check the current version of MySQL on a macOS.

Check MySQL Version in macOS

The following steps must be followed while trying to figure out the version.

  • Every time one log into the MySQL server, the version is displayed. However, if the default settings have been edited, the person can directly log into their MySQL account.

    This can be done with the help of the following query:

    mysql -u user
    
  • This brings up the MySQL console that shows the following message:
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement mysql>
    
  • Once the window mentioned above pops up, we can check the MySQL version with the help of the following query:
    mysql --version
    

    The output of the query above can be illustrated as follows:

    variable_name               name
    admin_tls_version           TLSv1,TLSv1.1,TLSv1.2,TLSv1.3
    immediate_server_version    999999
    innodb_version              8.0.27
    original_server_version     999999
    protocol_version            10
    replica_type_conversions
    slave_type_conversions
    tls_version                 TLSv1,TLSv1.1,TLSv1.2,TLSv1.3
    version 8.0.27
    version_comment             MySQL Community Server - GPL
    version_compile_machine     x86_64
    version_compile_os          Win64
    version_compile_zlib        1.2.11
    
  • Another method to fetch the current version of the MySQL server can be understood with the help of the following query:
    SHOW VARIABLES LIKE "%version%";
    

    The above query’s output is the same as the earlier query.

    variable_name               name
    admin_tls_version           TLSv1,TLSv1.1,TLSv1.2,TLSv1.3
    immediate_server_version    999999
    innodb_version              8.0.27
    original_server_version     999999
    protocol_version            10
    replica_type_conversions
    slave_type_conversions
    tls_version                 TLSv1,TLSv1.1,TLSv1.2,TLSv1.3
    version 8.0.27
    version_comment             MySQL Community Server - GPL
    version_compile_machine     x86_64
    version_compile_os          Win64
    version_compile_zlib        1.2.11
    

Therefore, we have successfully ventured to understand different techniques to find the current version of the MySQL server on macOS.

Write for us
DelftStack articles are written by software geeks like you. If you also would like to contribute to DelftStack by writing paid articles, you can check the write for us page.

Related Article - MySQL Version

  • Get Version in MySQL