Installing MySQL-python without mysql-server on CentOS

TimD picture TimD · Dec 17, 2012 · Viewed 26.2k times · Source

I'm attempting to install MySQL-python on a machine running CentOS 5.5 and python 2.7. This machine isn't running a mysql server, the mysql instance this box will be using is hosted on a separate server. I do have a working mysql client. On attempting sudo pip install MySQL-python, I get an error of EnvironmentError: mysql_config not found, which as far as I can tell is a command that just references /etc/my.cnf, which also isn't present. Before I go on some wild goose chase creating spurious my.cnf files, is there an easy way to get MySQL-python installed?

Answer

TimD picture TimD · Dec 18, 2012

So it transpires that mysql_config is part of mysql-devel. mysql-devel is for compiling the mysql client, not the server. Installing mysql-devel allows the installation of MySQL-python.