mysql_config not found when installing mysqldb python interface

前端 未结 30 1447
暗喜
暗喜 2020-11-22 06:56

I am trying to get a Python script to run on the linux server I\'m connected to via ssh. The script uses mysqldb. I have all the other components I need, but when I try to i

30条回答
  •  孤独总比滥情好
    2020-11-22 07:22

    I had this issues and solved if by adding a symlink to mysql_config.

    I had installed mysql with homebrew and saw this in the output.

    Error: The `brew link` step did not complete successfully
    

    Depending on how you got mysql it will be in different places. In my case /usr/local/Cellar/mysql
    Once you know where it is you should be able to ma a symbolic link to where python is looking for it. /usr/local/mysql

    This worked for me.

    ln -s /usr/local/Cellar/mysql/<< VERSION >>/bin/mysql_config   /usr/local/mysql/bin/mysql_config
    

提交回复
热议问题