Check mySQL version on Mac 10.8.5

后端 未结 4 812
忘了有多久
忘了有多久 2021-02-05 04:38

How can I check (step-by-step ) the version of mySQL installed on my Mac 10.8.5?

I tried using command prompt, but couldn\'t figure out.

4条回答
  •  伪装坚强ぢ
    2021-02-05 05:29

    To check your MySQL version on your mac, navigate to the directory where you installed it (default is usr/local/mysql/bin) and issue this command:

    ./mysql --version
    

    Alternatively, to avoid needing to navigate to that specific dir to run the command, add its location to your path ($PATH). There's more than one way to add a dir to your $PATH (with explanations on stackoverflow and other places on how to do so), such as adding it to your ./bash_profile.

    After adding the mysql bin dir to your $PATH, verify it's there by executing:

    echo $PATH
    

    Thereafter you can check your mysql version from anywhere by running (note no "./"):

    mysql --version
    

提交回复
热议问题