This will be less about a question and more of a way to document things. I had been attempting to use drush (Drush 11 and 12) after installing a new copy of Drupal. It kept throwing Error: Undefined Constant PDO::MYSQL_ATTR_USE_BUFFERED_QUERY Yet the site worked fine. I checked php.net and Drupal Answers but to no avail. What did I need to do to get Drush working correctly?

1 Answer 1


The short answer is, always make sure the PHP you are using on your web server and the php-cli are the same version. My server was running 8.1 and the cli was running 8.2. Once I changed the cli to 8.1, drush worked like a charming do-it-all tool, it is meant to be.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.