Issue with temporal-sql-tool command on GKE

I have configured temporal cluster on GKE and the DB is cloudsql mysql.
All the environmental values are part of containers

bash-5.1# env | grep -i sql
SQL_USER=user1
SQL_HOST=127.0.0.1
SQL_PASSWORD=password123
SQL_DATABASE=temporal
SQL_PLUGIN=mysql
SQL_PORT=3306
bash-5.1#

when i try to run I am getting below error

bash-5.1# export SQL_DATABASE=temporal
bash-5.1# temporal-sql-tool setup-schema -v 0.0
2022-09-28T10:16:06.434Z ERROR Unable to connect to SQL database. {“error”: “Error 1045: Access denied for user ‘user1\n’@‘cloudsqlproxy~someIPhere’ (using password: YES)”, “logging-call-at”: “handler.go:52”}

Again when I export all the variable manually again and running the command “temporal-sql-tool setup-schema -v 0.0” works fine.

Why it is not taking the environmental variable properly? I am struggling with this issue, Please tell me how to fix it?

Not really sure what could be going on, the error your are getting is typically associated with user privileges. See for example docs for setting up mysql here.
There is also some associated info on google cloud docs here, does not seems issue is related temporal sql tool.

I have sorted out the issue, it was incorrect username/password