1. Home
  2. Knowledge Base
  3. Server Management
  4. Replace MySQL modules in Cloudlinux with Native Driver (ND) modules

Sometimes standard MySQL modules(mysqli,mysql,pdo_mysql) can work incorrectly and it’s recommended to switch this modules to ND(native driver – nd_mysqli,mysqlnd,nd_pdo_mysql).

You can try to use a script like this  to enable those modules globally:

selectorctl --list-users --version=7.0 | sed -e 's/,/\n/g' | sed 's/^/selectorctl  --disable-user-extensions=mysqli,mysql,pdo_mysql --version=7.0 --user=/' | sh selectorctl --list-users --version=7.0 | sed -e 's/,/\n/g' | sed 's/^/selectorctl --enable-user-extensions=nd_mysqli,mysqlnd,nd_pdo_mysql --version=7.0 --user=/' | sh

The following commands will disable standard modules and will enable ND modules for all users that are using  alt-php70.

Was this article helpful?

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *