How do I install the mysqlnd driver using MAMP?

I've done a lot of research online, but I haven't found much on this that I don't understand. But it seems that the native mysql driver does not come with the MAMP stack. For example the mysqli get_result method doesn't work out of the box. I thought it was a bug in my installation, but after a clean reinstallation the method still doesn't work, so apparently the driver is not installed. It seems strange that there is so little material in this thread because many people have to test locally with get_result?
So it boils down to this: How do I install the mysqlnd driver? :-)

PHP.INI:

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
;   extension=modulename.extension
;
; For example, on Windows:
;
;   extension=msql.dll
;
; ... or under UNIX:
;
;   extension=msql.so
;
; Note that it should be the name of the module only; no directory information
; needs to go here.  Specify the location of the extension with the
; extension_dir directive above.


; Extensions

;extension=apcu.so

extension=imap.so
extension=yaz.so
extension=mcrypt.so
extension=gettext.so
extension=pgsql.so
extension=pdo_pgsql.so
extension=pdo_mysql.so

;extension=imagick.so
;extension=tidy.so
;extension=oauth.so

      

+3


source to share


1 answer


Which PHP version are you using?

In PHP 5.5, the original MySQL extension was deprecated [1]. The MAMP distribution should remove it from the database.

Try using the mysqli extension, or you should switch to the pdo_mysql extension.



There he is a converter to go from mysql extension to mysqli one: https://wikis.oracle.com/display/mysql/Converting+to+MySQLi

[1] http://php.net/manual/en/migration55.deprecated.php

+1


source







All Articles