Mysql schema compatibility error when starting temporal service

Hi I have a setup of MySQL which I would like to use with temporal service. I do not have root access hence earlier was getting creating database temporal and temporal_visibility errors. I fixed this by getting db created in sql. Now it works fine but I get following error in the end
Unable to start server. Error: sql schema version compatibility check failed: version mismatch for keyspace/database: “temporal”. Expected version: 1.5 cannot be greater than Actual version: 0.0”.
I am not sure why i am getting this error. Following is the content of my schema_version and schema_update_history table in temporal db.
mysql> select * from schema_version;
±------------------±---------±---------------------------±-------------±-----------------------+
| version_partition | db_name | creation_time | curr_version | min_compatible_version |
±------------------±---------±---------------------------±-------------±-----------------------+
| 0 | temporal | 2021-05-12 07:43:43.727355 | 0.0 | 0.0 |
±------------------±---------±---------------------------±-------------±-----------------------+
1 row in set (0.01 sec)

mysql> select * from schema_update_history
→ ;
±------------------±-----±------±---------------------------±----------------±-------------±------------±------------+
| version_partition | year | month | update_time | description | manifest_md5 | new_version | old_version |
±------------------±-----±------±---------------------------±----------------±-------------±------------±------------+
| 0 | 2021 | 5 | 2021-05-12 07:43:43.732558 | initial version | | 0.0 | 0 |
±------------------±-----±------±---------------------------±----------------±-------------±------------±------------+

As is visible the current_version and new_version are both 0.0.
Please help in solving this error.
In the end I got “temporal-web | establishing insecure connection…
temporal-web | temporal-web up and listening on port 8088
but when i try to see client I keep getting
"14 UNAVAILABLE: DNS resolution failed"
" OperationalError: 14 UNAVAILABLE: DNS resolution failed
temporal-web | at Object.exports.createStatusError (/usr/app/node_modules/grpc/src/common.js:91:15)
temporal-web | at Object.onReceiveStatus (/usr/app/node_modules/grpc/src/client_interceptors.js:1209:28)
temporal-web | at InterceptingListener._callNext (/usr/app/node_modules/grpc/src/client_interceptors.js:568:42)
temporal-web | at InterceptingListener.onReceiveStatus (/usr/app/node_modules/grpc/src/client_interceptors.js:618:8)
temporal-web | at callback (/usr/app/node_modules/grpc/src/client_interceptors.js:847:24) {
temporal-web | cause: Error: 14 UNAVAILABLE: DNS resolution failed"
Can someone point out what mistake am I making.

git clone https://github.com/temporalio/temporal.git
git checkout “the version you are using”, e.g. git checkout v1.9.2
make bins

temporal-sql-tool -u temporal --pw temporal --db temporal update-schema -d ./schema/mysql/v57/temporal/versioned
temporal-sql-tool -u temporal --pw temporal --db temporal_visibility update-schema -d ./schema/mysql/v57/visibility/versioned

ref: temporal/Makefile at v1.9.2 · temporalio/temporal · GitHub

When I am using default config.
environment: - DB=mysql - DB_PORT=3306 - MYSQL_USER=root - MYSQL_PWD=root **- MYSQL_SEEDS=mysql** - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development.yaml
No it was running fine. Can someone please answer which sql is used when seeds is provided as mysql. Where is temporal db created in this case when seeds=mysql is provided in yml config? I checked in localhost sql and couldn’t find temporal db.

I was reading the above and I am facing the same problem.
I even tried the proposed solution and it didn’t work for me.
Currently, I am on release branch v1.16.x

Unable to start server. Error: could not build arguments for function "go.temporal.io/server/common/pprof".
LifetimeHooks (/home/builder/temporal/common/pprof/fx.go:39): failed to build *pprof.PProfInitializerImpl: could not build arguments for function "go.temporal.io/server/common/pprof".
NewInitializer (/home/builder/temporal/common/pprof/pprof.go:56): failed to build *config.PProf: received non-nil error from function "go.temporal.io/server/temporal".
ServerOptionsProvider (/home/builder/temporal/temporal/fx.go:149): sql schema version compatibility check failed: version mismatch for keyspace/database: "temporal". 
Expected version: 1.8 cannot be greater than Actual version: 0.0

can someone help clarify what this issue is about ?

Was the db schema initialized? You can reference here on this.

yes I have intialized the DB schema still getting the same error

./temporal-sql-tool --database temporal_visibility create-database
SQL_DATABASE=temporal_visibility ./temporal-sql-tool setup-schema -v 0.0

Don’t use 【SQL_DATABASE=temporal_visibility】
Use 【./temporal-sql-tool --database temporal_visibility setup-schema -v 0.0】

1 Like