linux mysql-server 找不到 mysql_config
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8496660/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
linux mysql-server can't find mysql_config
提问by sadmicrowave
I have a running (in production) mysql instance on my linux server (ubuntu-10.10) however I cannot find my mysql_config file.
我的 linux 服务器 (ubuntu-10.10) 上有一个正在运行的(生产中)mysql 实例,但是我找不到我的 mysql_config 文件。
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.
我听说/读过我需要安装 libmysqlclient-dev 包才能使用 mysql_config 但我不想破坏我当前的生产实例。我想确保安装这个开发包不会对我当前的 mysql 数据库产生不利影响。
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.
此外,在哪里可以找到 libmysqlclient-dev 的源下载以手动安装?在我目前的情况下(在公司代理之后),我不允许使用 apt-get。
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.
这源于尝试从源代码安装 python-MySQLdb。setup.py 文件需要 mysql_config 路径,并在尝试使用该文件以外的任何内容时继续中断。
回答by Serdar GüLER
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.
mysql_config
如果您从预编译的二进制文件中安装可执行文件,则该可执行文件默认位于 MySQL 服务器安装的 bin 目录中。但是如果您使用apt-get
它安装它,您的服务器上可能不存在它。
Try:
尝试:
sudo apt-get install libmysqlclient-dev
回答by Bronwen Cassidy
yum install mariadb-devel
works for Centos 7 too, this puts the mysql_config
into all the places that pip install mysqlclient
requires/looks for it.
yum install mariadb-devel
也适用于 Centos 7,这将mysql_config
放入所有pip install mysqlclient
需要/寻找它的地方。
回答by Mukesh Chapagain
In Ubuntu 13.04 installation, it is at /usr/bin/mysql_config
在 Ubuntu 13.04 安装中,它位于 /usr/bin/mysql_config
回答by Mukesh Chapagain
On Fedora, install the mariadb-devel
package, and you should have the binary.
在 Fedora 上,安装mariadb-devel
软件包,您应该拥有二进制文件。
回答by Andreas Wederbrand
Try /etc/my.cnf, that is the standard file for mysql config.
试试/etc/my.cnf,这是mysql配置的标准文件。
回答by Mike Purcell
You can also do:
你也可以这样做:
find / -name my.cnf -type f