mysql_config not found

170 views
Skip to first unread message

ner...@gmail.com

unread,
Mar 12, 2008, 4:30:24 PM3/12/08
to Django users
Hello,

I'm assuming I need to add something to my .bash_profile PATH but I'm
not sure what. I unsuccessfully tried this:

PATH="/usr/local/mysql/bin/mysql_config:${PATH}"
export PATH

Oh yeah, here's the terminal error:

fastrax-studios-power-mac-g4:~/MySQL-python-1.2.2 fastraxstudio$
python setup.py build
sh: line 1: mysql_config: command not found
Traceback (most recent call last):
File "setup.py", line 16, in <module>
metadata, options = get_config()
File "/Users/fastraxstudio/MySQL-python-1.2.2/setup_posix.py", line
43, in get_config
libs = mysql_config("libs_r")
File "/Users/fastraxstudio/MySQL-python-1.2.2/setup_posix.py", line
24, in mysql_config
raise EnvironmentError, "%s not found" % mysql_config.path
EnvironmentError: mysql_config not found
fastrax-studios-pwer-mac-g4:~/MySQL-python-1.2.2 fastraxstudio$

Thanks for any help,

J

Evert Rol

unread,
Mar 12, 2008, 7:47:46 PM3/12/08
to django...@googlegroups.com
> I'm assuming I need to add something to my .bash_profile PATH but I'm
> not sure what. I unsuccessfully tried this:
>
> PATH="/usr/local/mysql/bin/mysql_config:${PATH}"
> export PATH

Try 'locate mysql_config' on the terminal prompt, and see what that
gives you. (Or otherwise spotlight, but that may be avoiding unix
system dirs.)
Does the 'mysql' command itself exist? (Ie, can you enter that at the
command line?)
How was mysql installed on your system?

ner...@gmail.com

unread,
Mar 19, 2008, 2:03:35 PM3/19/08
to Django users
I ran locate and found this /usr/local/mysql-5.0.51a-osx10.4-powerpc/
bin/mysql_config which I then tried adding to my .bash_profile as
PATH="/usr/local/mysql-5.0.51a-osx10.4-powerpc/bin/mysql_config:$
{PATH}"
export PATH but this didn't work either. I can't enter mysql at the
command prompt I can only start the server with /usr/local/mysql/bin/
mysql

On Mar 12, 4:47 pm, Evert Rol <evert....@gmail.com> wrote:
> > I'm assuming I need to add something to my .bash_profile PATH but I'm
> >notsure what. I unsuccessfully tried this:
>
> > PATH="/usr/local/mysql/bin/mysql_config:${PATH}"
> > export PATH
>
> Try 'locatemysql_config' on the terminal prompt, and see what that
> gives you. (Or otherwise spotlight, but that may be avoiding unix
> system dirs.)
> Does the 'mysql' command itself exist? (Ie, can you enter that at the
> command line?)
> How was mysql installed on your system?
>
> > Oh yeah, here's the terminal error:
>
> > fastrax-studios-power-mac-g4:~/MySQL-python-1.2.2 fastraxstudio$
> > python setup.py build
> > sh: line 1:mysql_config: commandnotfound
> > Traceback (most recent call last):
> > File "setup.py", line 16, in <module>
> > metadata, options = get_config()
> > File "/Users/fastraxstudio/MySQL-python-1.2.2/setup_posix.py", line
> > 43, in get_config
> > libs =mysql_config("libs_r")

Evert Rol

unread,
Mar 19, 2008, 2:09:39 PM3/19/08
to django...@googlegroups.com
> I ran locate and found this /usr/local/mysql-5.0.51a-osx10.4-powerpc/
> bin/mysql_config which I then tried adding to my .bash_profile as
> PATH="/usr/local/mysql-5.0.51a-osx10.4-powerpc/bin/mysql_config:$
> {PATH}"
> export PATH but this didn't work either. I can't enter mysql at the
> command prompt I can only start the server with /usr/local/mysql/bin/
> mysql

You set the the PATH to the executable, but you'll need to set the
PATH to the *directory* containg the executable. So

export PATH=${PATH}:/usr/local/mysql-5.0.51a-osx10.4-powerpc/bin/

(often, it's better to append the path than prepend it; otherwise you
may 'override' default executables.)
The 'mysql' may very well be located in that same directory, btw.

I would recommend that you set the PATH only for the one time you run
python setup.py build/install, so just execute the export command in
the terminal before running that (actually, once you've set the PATH
correctly, execute mysql_config first, to see things actually work.

Reply all
Reply to author
Forward
0 new messages