maria db的UDF正则表达式

时间:2011-07-12 02:56:41

标签: regex user-defined-functions mariadb

我发现using regular expressions in mysql这个用户定义的功能非常好 但是在尝试安装时我找不到mysql库

checking for mysqlbin... dirname: missing operand
Try `dirname --help' for more information.
checking for mysql_config... no
no
configure: error: "Can't find mysql library"

网站上写着If mysql is an unusual place, you might need to add --with-mysql=<mysql directory>/bin/mysql_config

我找不到mysql_config

/var/log/mysql
/var/lib/mysql
/var/lib/mysql/mysql
/usr/share/mysql
/usr/lib/mysql
/etc/mysql/

我正在使用ubuntu lucid lynx,任何sugestions将非常感谢 编辑安装工作归功于apt-get install libmariadbclient16-dev,但现在preg_replace('/i/','a','ia')返回6161而不是ii

3 个答案:

答案 0 :(得分:2)

您需要安装libmysqlclient-dev(或libmariadbclient16-dev,如果您愿意)才能获得mysql_config。

答案 1 :(得分:0)

对于centos:

sudo yum install MariaDB-devel

在您需要选择mariadb repo之前:https://downloads.mariadb.org/mariadb/repositories/#mirror=timeweb&distro=CentOS&distro_release=centos6-amd64--centos6&version=10.0

ps:“3。选择版本”是指maria db版本!

答案 2 :(得分:0)

https://github.com/mysqludf/lib_mysqludf_preg/issues/5

mysql_config not found was a good clue : Had to install - 
sudo apt-get install libmysqlclient-dev