Allacino

Allacino

@Allacino
Bratislava

Laravel nadsenec

Jul 24, 2020

Re: The server requested authentication method unknown to the client [caching_sha2_password]

Allacino dal hlas Re: The server requested authentication method unknown to the client [caching_sha2_password]

Nastavit pre mysql uzivatela nativne (stary sposob prihlasovania) heslo

alter user 'username'@'localhost' identified with mysql_native_password by 'password';

pripadne pouzit starsiu verziu mysql, alebo mariadb

Oct 18, 2019

The server requested authentication method unknown to the client [caching_sha2_password]

Allacino vytvoril tému The server requested authentication method unknown to the client [caching_sha2_password]

Ake riesenie "workaround" pouzivate pre connection Laravel '6.0' s DB MySql '8.0.18'?

V tejto kombinacii hadze php artisan migrate error :

  Illuminate\Database\QueryException  : SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: SHOW FULL TABLES WHERE table_type = 'BASE TABLE')

  at /Users/lacike/www/bookingsystem/vendor/laravel/framework/src/Illuminate/Database/Connection.php:665
    661|         // If an exception occurs when attempting to run a query, we'll format the error
    662|         // message to include the bindings with SQL, which will make this exception a
    663|         // lot more helpful to the developer instead of just the database's errors.
    664|         catch (Exception $e) {
  > 665|             throw new QueryException(
    666|                 $query, $this->prepareBindings($bindings), $e
    667|             );
    668|         }
    669| 

  Exception trace:

  1   PDOException::("PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password]")
      /Users/lacike/www/bookingsystem/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70

  2   PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=booking", "root", "SystemUser1", [])
      /Users/lacike/www/bookingsystem/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70