Answers.Body: <p>For anyone from the future, this worked for me utilizing Ubuntu 16.0.4 with PHP7.2:</p>
  
  <p>Try this command:</p>
  
  <pre><code>sudo phpenmod pdo_mysql
  </code></pre>
  
  <p>If it says it cant find the package, install this:</p>
  
  <pre><code>sudo apt-get install php7.2-mysql
  </code></pre>
  
  <p>Check your active php.ini file for this line(<em>my active .ini was located n /etc/php/7.2/apache2/php.ini</em>):</p>
  
  <pre><code>;extension=pdo_mysql
  </code></pre>
  
  <p>If it has a semicolon before it, remove it, and then save. For good measure, run this again:</p>
  
  <pre><code>sudo phpenmod pdo_mysql
  </code></pre>
  
  <p>Restart apache. Good day.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-21T07:58:02.920Z
Answers.LastActivityDate: 2018-03-21T07:58:02.920Z
Answers.UserDisplayName: Dan Zuzevich
Body: <p>Craft CMS 3 - I have used the CLI ./craft setup script to set the database connection on my local machine. I setup a MySQL connection, but when it attempts to validate my credentials, I get "failed: could not find driver". However, when I make a direct MySQL CLI connection using the same credentials, it works just fine. Why can Craft CMS not connect to my local database?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-11-01T17:09:17.790Z
Comments.Text: Do you have https://secure.php.net/manual/en/ref.pdo-mysql.php installed?
Comments.UserDisplayName: Brad Bell
Tags: <database><craft3><cli>
Title: failed: could not find driver
ThreadText: # failed: could not find driver
  
  (Asked by: username_0 on 2017-11-01)
  
  Craft CMS 3 - I have used the CLI ./craft setup script to set the database connection on my local machine. I setup a MySQL connection, but when it attempts to validate my credentials, I get "failed: could not find driver". However, when I make a direct MySQL CLI connection using the same credentials, it works just fine. Why can Craft CMS not connect to my local database?
  
  **Tags:** database, craft3, cli
  
  > **Comments:**
  > **username_1**: Do you have https://secure.php.net/manual/en/ref.pdo-mysql.php installed?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-03-21. Score: 2
  
  For anyone from the future, this worked for me utilizing Ubuntu 16.0.4 with PHP7.2:
  
  Try this command:
  
  ```
  sudo phpenmod pdo_mysql
  
  ```
  
  If it says it cant find the package, install this:
  
  ```
  sudo apt-get install php7.2-mysql
  
  ```
  
  Check your active php.ini file for this line(*my active .ini was located n /etc/php/7.2/apache2/php.ini*):
  
  ```
  ;extension=pdo_mysql
  
  ```
  
  If it has a semicolon before it, remove it, and then save. For good measure, run this again:
  
  ```
  sudo phpenmod pdo_mysql
  
  ```
  
  Restart apache. Good day.
  
  
  ---
  
  