How to install MySQLi on MacOS

55

I cannot find instructions about installing MySQLi on a Mac. Just to be clear, MySQL is up to date and I am running PHP 5. How do I install it? Where do I even get it from? Thanks for your help. I'll be giving an up vote and a check mark to whoever answers this!

This question is tagged with php macos mysqli

~ Asked on 2011-08-30 22:05:33

The Best Answer is


38

MySQLi is part of PHP. There should be a php-mysqli type package available, or you can take the PHP source and recompile that mysqli enabled. You may already have it installed, but it's done as a module and is disabled. Check your php.ini for extension=mysqli.so or similar. it may be commented out, or the .so file is present in your extensions directory but not linked to PHP via that extension= directive.

~ Answered on 2011-08-30 22:14:23


57

Use php-mysqlnd instead of php-mysql. On Linux, to install with apt-get type:

apt-get install php-mysqlnd

~ Answered on 2014-09-04 23:39:39


Most Viewed Questions: