maria db 的 UDF 正则表达式

发布于 2024-11-19 22:55:54 字数 814 浏览 3 评论 0原文

我发现这个非常好的用户定义函数在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=/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,任何建议将不胜感激
编辑感谢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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

世界和平 2024-11-26 22:55:54

您需要安装 libmysqlclient-dev (或 libmariadbclient16-dev 如果您愿意的话)来获取 mysql_config。

You need to install libmysqlclient-dev ( or libmariadbclient16-dev if you wish ) to get mysql_config.

满意归宿 2024-11-26 22:55:54

对于 centos:

sudo yum install MariaDB-devel

您需要选择 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:

sudo yum install MariaDB-devel

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!

诗酒趁年少 2024-11-26 22:55:54

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

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文