maria db 的 UDF 正则表达式
我发现这个非常好的用户定义函数在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"
该网站显示 如果 mysql 是一个不寻常的地方,您可能需要添加 --with-mysql=
我找不到 mysql_config
/var/log/mysql
/var/lib/mysql
/var/lib/mysql/mysql
/usr/share/mysql
/usr/lib/mysql
/etc/mysql/
我正在使用 ubuntu lucid lynx,任何建议将不胜感激
编辑感谢apt-get install libmariadbclient16-dev
安装成功,但是现在preg_replace('/i/','a','ia') 返回
6161
而不是 ii
I've found this really good user defined functions for using regular expressions in mysql
However when trying to instal I get can't find mysql library
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"
The site says If mysql is an unusual place, you might need to add --with-mysql=<mysql directory>/bin/mysql_config
I can't find mysql_config
/var/log/mysql
/var/lib/mysql
/var/lib/mysql/mysql
/usr/share/mysql
/usr/lib/mysql
/etc/mysql/
I am using ubuntu lucid lynx, any sugestions would be greatly appreciated
EDIT the installation worked thanks to apt-get install libmariadbclient16-dev
however now preg_replace('/i/','a','ia')
returns 6161
instead of ii
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要安装 libmysqlclient-dev (或 libmariadbclient16-dev 如果您愿意的话)来获取 mysql_config。
You need to install libmysqlclient-dev ( or libmariadbclient16-dev if you wish ) to get mysql_config.
对于 centos:
您需要选择 mariadb 存储库: https://downloads.mariadb.org/mariadb/repositories/#mirror=timeweb&distro=CentOS&distro_release=centos6-amd64--centos6&version=10.0
ps: "3.选择版本”表示 maria db 版本!
For centos:
Before you need to choose mariadb repo at: https://downloads.mariadb.org/mariadb/repositories/#mirror=timeweb&distro=CentOS&distro_release=centos6-amd64--centos6&version=10.0
ps: "3. Choose a Version" means maria db version!
https://github.com/mysqludf/lib_mysqludf_preg/issues/5
https://github.com/mysqludf/lib_mysqludf_preg/issues/5