Find out where MySQL is installed on Mac OS X

前端 未结 7 1387
梦谈多话
梦谈多话 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:34

    If you run SHOW VARIABLES from a mysql console you can look for basedir.

    When I run the following:

    mysql> SHOW VARIABLES WHERE `Variable_name` = 'basedir';
    

    on my system I get /usr/local/mysql as the Value returned. (I am not using MAMP - I installed MySQL with homebrew.

    mysqldon my machine is in /usr/local/mysql/bin so the basedir is where most everything will be installed to.

    Also util:

    mysql> SHOW VARIABLES WHERE `Variable_name` = 'datadir'; 
    

    To find where the DBs are stored.

    For more: http://dev.mysql.com/doc/refman/5.0/en/show-variables.html

    and http://dev.mysql.com/doc/refman/5.0/en/server-options.html#option_mysqld_basedir

提交回复
热议问题