Confluence 에 심각한 보안 취약점이 발견되었으니 사용자분들은 업그레이드 하세요.!
 
1
0
-1
책 6장에서 다음 명령을 실행할 때 에러 메시지가 표시됩니다. songwangmyeong-ui-Mac-mini:myapp2 kmson$ php artisan make:migration create_posts_tables --create=posts Created Migration: 2019_06_30_025929_create_posts_tables songwangmyeong-ui-Mac-mini:myapp2 kmson$ php artisan make:migration created_authors_table --create=authors Created Migration: 2019_06_30_030042_created_authors_table songwangmyeong-ui-Mac-mini:myapp2 kmson$ php artisan migrate Illuminate\Database\QueryException : SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client (SQL: select * from information_schema.tables where table_schema = myapp2 and table_name = migrations and table_type = 'BASE TABLE') at /Users/kmson/myapp2/myapp2/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664 660| // If an exception occurs when attempting to run a query, we'll format the error 661| // message to include the bindings with SQL, which will make this exception a 662| // lot more helpful to the developer instead of just the database's errors. 663| catch (Exception $e) { > 664| throw new QueryException( 665| $query, $this->prepareBindings($bindings), $e 666| ); 667| } 668| Exception trace: 1 PDOException::("PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password]") /Users/kmson/myapp2/myapp2/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70 2 PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=myapp2", "homestead", "secret", []) /Users/kmson/myapp2/myapp2/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70 Please use the argument -v to see more details. 참고로 데이터베이스 명은 myapp2 이고 .env 설정은 다음과 같습니다. APP_NAME=Laravel APP_ENV=local APP_KEY=base64:b4w3uMB+5oYB9cESu046BcFDBGmaNeKGldRNC9BTsC0= APP_DEBUG=true APP_URL=http://localhost LOG_CHANNEL=stack DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=myapp2 DB_USERNAME=homestead DB_PASSWORD=secret BROADCAST_DRIVER=log CACHE_DRIVER=file QUEUE_CONNECTION=sync SESSION_DRIVER=file SESSION_LIFETIME=120 REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 MAIL_DRIVER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_DEFAULT_REGION=us-east-1 AWS_BUCKET= PUSHER_APP_ID= PUSHER_APP_KEY= PUSHER_APP_SECRET= PUSHER_APP_CLUSTER=mt1 MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" ...
    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      버전 확인 해보니 8.x 라서 다음과 같이 실행하였더니 해결 되었습니다.


      alter user 'homestead'@'%' with mysql_native_password by 'secret';


      감사합니다.


        CommentAdd your comment...
      1.  
        1
        0
        -1

        MySQL 버전이 어떻게되죠? 8.0을 사용하신다면, 아래 링크를 참고해서 사용자 비밀번호를 바꾸거나, 사용자를 다시 만들어주세요.

        https://stackoverflow.com/a/50776838

          CommentAdd your comment...