what the different between MySQL Native Driver and

2019-02-23 07:11发布

i want to know the different between MySQL Native Driver and MySQL Client Library
and when to use both of them

2条回答
▲ chillily
2楼-- · 2019-02-23 07:41

mysql:

  • dual licence
  • optional automatic reconnect
  • all memory allocation and deallocation is done using operating system memory management

mysqlnd:

mysqlnd via plugins:

incompatibilities between mysql and mysqlnd:

  • values of bit data type are returned as binary strings with mysql.so and as decimal strings with mysqlnd.so (source).

Based on this and other docs: http://php.net/manual/en/mysqlinfo.library.choosing.php

查看更多
姐就是有狂的资本
3楼-- · 2019-02-23 07:43

There is no big difference in the PHP language level.

  • libmysqlclient distributed by MySQL, mysqlnd distributed by PHP.
  • libmysqlclient is part of MySQL, you need install MySQL library.
  • Their license are different.
  • mysqlnd supports a lot of plugins (mysqlnd_ms & mysqlnd_qc & ...).
  • Because mysqlnd is part of PHP, its memory could be limited by PHP configuration.
  • mysqlnd is the default after 5.4

http://php.net/manual/en/mysqlinfo.library.choosing.php

查看更多
登录 后发表回答