UDF Regular Expressions for maria db
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 appreciat开发者_JAVA技巧ed
EDIT the installation worked thanks toapt-get install libmariadbclient16-dev
however now preg_replace('/i/','a','ia')
returns 6161
instead of ii
You need to install libmysqlclient-dev ( or libmariadbclient16-dev if you wish ) to get mysql_config.
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!
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
精彩评论