MySQL is not found anywhere on computer

亡梦爱人 提交于 2019-12-04 17:00:52

Well, if you're saying that MySQL is running, you can try looking for it via terminal command like this:

ps aux | grep mysql

which should give something like

12345 ... 5 Apr16 9:09.32 /usr/local/Cellar/mysql/5.6.17/bin/mysqld --basedir=/usr/local/Cellar/mysql/5.6.17 --datadir=/usr/local/var/mysql --bind-address=127.0.0.1 

so basedir and datadir is probably the most valuable outputs here (please note that your path most likely will be different).

On top of it, in order to get mysql command running through terminal you have two options

  1. Create simulink from mysql's basedir into your /usr/local/bin directory

    ln -s /usr/local/Cellar/mysql/5.6.17/bin/mysql /usr/local/bin/mysql

  2. Add mysql's basedir/bin to your path (need to add this to your ~/.bashrc to make it persistent)

    export PATH=/usr/local/Cellar/mysql/5.6.17/bin/:$PATH

    New terminal tab is required for these changes to catch up.

Cheers.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!