Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

linux mysql-server can't find mysql_config

I have a running (in production) mysql instance on my linux server (ubuntu-10.10) however I cannot find my mysql_config file.

command and output:

~$ locate mysql_config
~$

I've heard/read that I need the libmysqlclient-dev package installed to be able to use mysql_config but I don't want to break my current production instance. I want to make sure installing this dev package is not going to have adverse effects on my current mysql databases.

Furthermore, where can I find the source download for libmysqlclient-dev to install manually? In my current situation (behind corporate proxy) I am not permitted to use apt-get's.

UPDATE

this is stemming from attempting to install python-MySQLdb from source. the setup.py file is requiring the mysql_config path and continues to break when trying to use anything but that file.

like image 643
sadmicrowave Avatar asked Dec 13 '11 21:12

sadmicrowave


People also ask

What is Mysql_config?

mysql_config provides you with useful information for compiling your MySQL client and connecting it to MySQL. It is a shell script, so it is available only on Unix and Unix-like systems.

Can t exec mysql_ config No such file?

How to fix Can't exec mysql_config: No such file or directory at Makefile.PL. This error occurs if the system cannot find MySQL client package. The install script "Makefile.PL" can be configured using lots of switches such as --cflags , --libs etc… cflags is a list of flags that are given to C compiler.


1 Answers

The mysql_config executable is by default located in the bin directory of the MySQL server installation if you install it from precompiled binaries. But if you install it using apt-get it may not exist on your server.

Try:

sudo apt-get install libmysqlclient-dev
like image 146
Serdar GÜLER Avatar answered Oct 07 '22 04:10

Serdar GÜLER