Find out where MySQL is installed on Mac OS X

前端 未结 7 1517
梦谈多话
梦谈多话 2021-01-30 07:53

How do I find out where MySQL is installed on Mac OS X 10.7.9? I have MAMP installed so I presume that it is bundled with this install?

7条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-30 08:33

    To check MySQL version of MAMP , use the following command in Terminal:

    /Applications/MAMP/Library/bin/mysql --version
    

    Assume you have started MAMP .

    Example output:

    ./mysql  Ver 14.14 Distrib 5.1.44, for apple-darwin8.11.1 (i386) using  EditLine wrapper
    

    UPDATE: Moreover, if you want to find where does mysql installed in system, use the following command:

    type -a mysql
    

    type -a is an equivalent of tclsh built-in command where in OS X bash shell. If MySQL is found, it will show :

    mysql is /usr/bin/mysql
    

    If not found, it will show:

    -bash: type: mysql: not found
    

    By default , MySQL is not installed in Mac OS X.

    Sidenote: For XAMPP, the command should be:

    /Applications/XAMPP/xamppfiles/bin/mysql --version
    

提交回复
热议问题