Skip to content

Mysql 8.0.16 (latest) authentication error #15

@theoo

Description

@theoo

Context

Running the following commands to install and run mysql and lychee

LYCHEE_BASE=/path/to

docker run -d --name mysql --network lychee -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=lychee -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=lychee mysql:8.0.16

docker run -d --name=lychee-laravel -v ${LECHEE_BASE}/conf:/conf -v ${LECHEE_BASE}/uploads:/uploads -e PUID=1000 -e PGID=1000 -e PHP_TZ=Europe/Berlin -e DB_CONNECTION=mysql -e DB_HOST=mysql -e DB_PORT=3306 -e DB_DATABASE=lychee -e DB_USERNAME=lychee -e DB_PASSWORD=password -p 80:80 --network lychee bigrob8181/lychee-laravel

Issue

Raises an authentication error while running install script:

**** Migrate the database ****

In Connection.php line 664:
                                                                               
  SQLSTATE[HY000] [2054] The server requested authentication method unknown t  
  o the client (SQL: select * from information_schema.tables where table_sche  
  ma = lychee and table_name = migrations)                                     
                                                                               

In PDOConnection.php line 31:
                                                                               
  SQLSTATE[HY000] [2054] The server requested authentication method unknown t  
  o the client                                                                 
                                                                               

In PDOConnection.php line 27:
                                                                               
  SQLSTATE[HY000] [2054] The server requested authentication method unknown t  
  o the client                                                                 
                                                                               

In PDOConnection.php line 27:
                                                                               
  PDO::__construct(): The server requested authentication method unknown to t  
  he client [caching_sha2_password]

Possible fix

(working on my installation), found inspiration here:

$ docker exec -it mysql mysql -u lychee -p -e "alter user 'lychee' identified with mysql_native_password by 'password';"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions