MySQL Native Driver 和 MySQL Client Library 有什么区别

2021-12-25 00:00:00 php mysql mysqli mysqlnd

我想知道 MySQL Native Driver 和 MySQL Client Library 的区别以及何时使用它们

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

推荐答案

PHP 语言层面没有太大区别.

There is no big difference in the PHP language level.

  • 由 MySQL 分发的 libmysqlclient,由 PHP 分发的 mysqlnd.
  • libmysqlclient 是 MySQL 的一部分,您需要安装 MySQL 库.
  • 他们的许可证不同.
  • mysqlnd 支持很多插件(mysqlnd_ms & mysqlnd_qc & ...).
  • 因为 mysqlnd 是 PHP 的一部分,它的内存可能会受到 PHP 配置的限制.
  • mysqlnd 是 5.4 之后的默认值

http://php.net/manual/en/mysqlinfo.library.选择.php

相关文章