Page 1 of 1

php drivers:: mysql, mysqli, mysqlnd

Posted: Mon Jun 30, 2008 10:24 am
by claws
Hi,

It is clear that mysql driver is for php 4.* versions and from php5 Mysqli driver is added (which is fast, object oriented).

Fine, but
1. what is mysqlind (MySQL native driver for PHP)?
2. why is this driver introduced? when mysqli is serving good?
3. like mysql driver is mysqli is going to be deprecated and mysqlnd will be standard?
4. Which one to use mysqlnd or mysqli?

FAQ on Mysqlnd website (http://dev.mysql.com/downloads/connector/php-mysqlnd/) says:
Q: Is mysqlnd a new PHP extension?

No, the new MySQL driver for PHP is not a new PHP extension. The driver is a replacement for libmysql on the internal C level of the PHP extension ext/mysqli.

You can continue to compile the ext/mysqli extension with libmysql like ever since. We will not remove this functionality. Alternatively you can compile ext/mysqli with mysqlnd. We suggest that you try it, because mysqlnd is easier to compile and we found it to be faster than libmysql.
I didn't get what does that mean? libmysql?? what is that?

Re: php drivers:: mysql, mysqli, mysqlnd

Posted: Mon Jun 30, 2008 11:46 am
by Kieran Huggins
looks like the MySQL guys have coded what they believe is a better library for PHP to interface with MySQL.

As far as I can tell, it will be up to the PHP devs to roll this into PHP core.

This seems like an internal decision, one that we don't need to worry about. (I could be wrong)