mysqlballerinapersist

Getting an error with Ballerina persistance


I'm getting below error when tried to run my code

Running executable

error: Error in SQL connector configuration: Failed to initialize pool: Public Key Retrieval is not allowed Caused by :Public Key Retrieval is not allowed Caused by :Public Key Retrieval is not allowed

I have set up mysql docker image by

docker pull mysql
docker run -e "MYSQL_ROOT_PASSWORD=my-secret-pw" --name persist-mysql -p 3305:3306 -d mysql 

Solution

  • This error seems to show up when you try to initialize the persistence client when the relevant database and tables are not created.

    Creating these by manually executing the generated script.sql script ought to fix the issue.