With both of php-mysql
and php-mysqlnd
you have mysql
, mysqli
and PDO
drivers all together. If you just need mysqli
driver you already have it with php-mysql
.
However if you want migrate to MySQL native driver According to documentation you must pay attention to these:
--The new mysqlnd library necessitates the use of MySQL 4.1's newer
41-byte password format. Continued use of the old 16-byte passwords
will cause mysql_connect() and similar functions to emit the error,
"mysqlnd cannot connect to MySQL 4.1+ using old authentication." The
--new mysqlnd library does not read mysql configuration files
(my.cnf/my.ini), as the older libmysqlclient library does. If your
code relies on settings in the configuration file, you can load it
explicitly with the mysqli_options() function. Note that this means
the PDO specific constants PDO::MYSQL_ATTR_READ_DEFAULT_FILE and
PDO::MYSQL_ATTR_READ_DEFAULT_GROUP are not defined if MySQL support in
PDO is compiled with mysqlnd.
Generally you don't have any problem to migrate from MySQL driver to MySQL native driver. Also it recommended to use php-mysqlnd instead of php-mysql.