# Issue with temporal-sql-tool command on GKE

**URL:** <https://community.temporal.io/t/issue-with-temporal-sql-tool-command-on-gke/6076>\
**Category:** Community Support\
**Tags:** mysql\
**Created:** [September 28, 2022, 10:24am UTC](https://community.temporal.io/t/issue-with-temporal-sql-tool-command-on-gke/6076 "2022-09-28T10:24:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhanabal2710](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/dhanabal2710/32/7909_2.png) [@Dhanabal2710](https://community.temporal.io/u/Dhanabal2710)\
**Post date:** [September 28, 2022, 10:24am UTC](https://community.temporal.io/t/issue-with-temporal-sql-tool-command-on-gke/6076/1 "2022-09-28T10:24:24Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)\
**Post date:** [September 30, 2022, 4:28am UTC](https://community.temporal.io/t/issue-with-temporal-sql-tool-command-on-gke/6076/3 "2022-09-30T04:28:22Z")

</div>

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](https://github.com/temporalio/temporal/blob/master/develop/docs/macos/mysql.md).  
There is also some associated info on google cloud docs [here](https://cloud.google.com/sql/docs/mysql/error-messages), does not seems issue is related temporal sql tool.

---

<div class="post-metadata">

**Author:** ![Dhanabal2710](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/dhanabal2710/32/7909_2.png) [@Dhanabal2710](https://community.temporal.io/u/Dhanabal2710)\
**Post date:** [September 30, 2022, 4:46am UTC](https://community.temporal.io/t/issue-with-temporal-sql-tool-command-on-gke/6076/4 "2022-09-30T04:46:45Z")

</div>

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