libmysqlclient. A static library acquisition method
1. Download the source code and compile it
Get the MariaDB source code, download the corresponding source code, and download the addressmariadb-5.5.56.tar.gzAfter downloading, transfer it to the virtual machine, unzip it, and then compile it.
Common libraries required for installation
apt-get install bison
apt-get install flex
apt-get install ncurse-devel
apt-get install cmake
Compile MariaDB to get libmysqlclient a
tar –zxvf mariadb-5.5.56.tar.gz
cd mariadb-5.5.56
cmake . – LH # view the available options for cmake
cmake . -DCMAKE_INSTALL_PREFIX=/home/mysql
-DMYSQL_DATADIR=/home/mysqldata -DSYSCONFDIR=/etc
-DWITHOUT_TOKUDB=1 -DMYSQL_UNIX_ADDR=/home/tmp/mysql.sock
-DDEFAULT_CHARSET=gbk -DDEFAULT_COLLATION=gbk_general_ci
make
make install
After completing the above command, you can get libmysqlclient.com in the / home / MySQL / lib / directory A static library file
2. Directly obtain libmysqlclient A way of
Download the compiled MariaDB file,MariaDB download address
Find the corresponding version. I use Linux, so it corresponds to mariadb-5.5.56-linux-x86_ 64.tar. gz
decompression
tar -zxvf mariadb-5.5.56-linux-x86_64.tar.gz
libmysqlclient. The a file is in the Lib folder of the directory
3. Download the libmysqlclient I uploaded directly a
You can find it in the resources in my CSDN