Introduction to mysqlnd extension and mysqlnd Extension

Source: Internet
Author: User

Introduction to mysqlnd extension and mysqlnd Extension

Author: zhanhailiang Date:

MySQL Native Driver (mysqlnd) is introduced as a substitute for libmysqlclient in PHP5.3.0. Previously, MySQL database extensions mysql, mysqli, and pdo mysql All communicate with MySQL Server through libmysqlclient. Mysqlnd is introduced. All three extensions can communicate with MySQL Server through mysqlnd.

Advantages
  1. Mysqlnd is easier to compile because it is an integral part of the php source code tree. Compiling Based on libmysqlclient means that MySQL needs to be installed locally;
  2. The internal mechanism of mysqlnd and php is more closely integrated and is the optimized mysql driver;
  3. Mysqlnd saves more memory. From the test results, it saves 40% of memory than the traditional mysql expansion;
  4. Mysqlnd is faster;
  5. Mysqlnd provides a wealth of Performance Statistics functions;
  6. Mysqlnd acts as a MySQL Proxy through the MySQL Native Driver Plugin API feature to achieve load balancing, monitoring and performance optimization
  7. Mysqlnd uses PHP license to avoid unnecessary copyright disputes;
Install
./configure --prefix=/usr/local/php-5.3.29-production --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-openssl --with-pdo-mysql=mysqlnd --enable-fpm --enable-mysqlndmake && make install
Test
[root@/usr/local]# /usr/local/php-5.3.29-production/bin/php -ini|grep mysqlndConfigure Command =>  './configure'  '--prefix=/usr/local/php-5.3.29-production' '--with-pear' '--with-iconv=/usr/local/' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-openssl' '--with-libxml-dir' '--with-curl' '--with-pdo-mysql=mysqlnd' '--disable-fileinfo' '--enable-fpm' '--enable-mysqlnd' '--with-mcrypt' '--enable-mbstring'Client API version => mysqlnd 5.0.8-dev - 20102224 - $Id: 731e5b87ba42146a687c29995d2dfd8b4e40b325 $Client API library version => mysqlnd 5.0.8-dev - 20102224 - $Id: 731e5b87ba42146a687c29995d2dfd8b4e40b325 $mysqlndmysqlnd => enabledVersion => mysqlnd 5.0.8-dev - 20102224 - $Id: 731e5b87ba42146a687c29995d2dfd8b4e40b325 $Client API version => mysqlnd 5.0.8-dev - 20102224 - $Id: 731e5b87ba42146a687c29995d2dfd8b4e40b325 $
Read more
  1. Mysqlnd
  2. Mysqlnd plugins

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.