title: MySQL Error: Authentication plugin 'caching_sha2_password' cannot be loaded
body: <p>I just installed MySQL Ver 14.14 Distrib 5.7.22 with Homebrew on my macOS v10.13.4.<br>
  I ran the command:<br>
  <code>brew install mysql</code> </p>
  
  <p>After the installation completed, as directed by Homebrew, I ran the command:<br>
  <code>mysql_secure_installation</code><br>
  and was returned the error: <code>Error: Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/Cellar/mysql/5.7.22/lib/plugin/caching_sha2_password.so, 2): image not found</code>   </p>
  
  <p>I tried a few things like changing default_authentication_plugin to mysql_native_password in the my.cnf file but it still throws the same error. </p>
  
  <p>Next I tried running:<br>
  <code>mysql_upgrade -u root</code><br>
  and I was thrown the same error again <code>mysql_upgrade: Got error: 2059: Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/Cellar/mysql/5.7.22/lib/plugin/caching_sha2_password.so, 2): image not found while connecting to the MySQL server
  Upgrade process encountered error and will not continue.</code></p>
  
  <p>Any help is appreciated.</p>