Client does not support authentication protocol requested by server

When I run in Xcode after creating the docker mysql server and making the mysql code changes in the app, I. get the following message in the Xcode console:

[MySQLError.invalidQuery: MySQL error 1251 #08004Client does not support authentication protocol requested by server; consider upgrading MySQL client] [/Users/davidcutshaw/vapor/TILApp/.build/checkouts/mysql.git-1890032512239690518/Sources/MySQL/Internals/Task.swift:49:61]
Program ended with exit code: 1

I had previously run these commands in the Terminal:

docker run --name mysql -e MYSQL_USER=til -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=vapor -p 3306:3306 -d mysql/mysql-server

–and–

docker exec -it mysql mysql -u til -ppassword

mysql was running.

This is with code from the section “Creating an API”.

1 Like

@rcutshaw I can’t remember if the MySQL bug for 8 has been fixed yet or not. Do you want to try removing the Docker DB with docker stop mysql && docker rm mysql and then choose a 5.7 DB with docker run --name mysql -e MYSQL_USER=til -e MYSQL_PASSWORD=password -e MYSQL_DATABASE=vapor -p 3306:3306 -d mysql/mysql-server:5.7

1 Like

That did it! Thank you.

1 Like