Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 创建数据库语句报错,求助
[TiDB Usage Environment] Test
[TiDB Version] 5.7.10-TiDB-v1.3.0-79-gde837ca-dirty
mysql> CREATE DATABASE nacos\G
*************************** 1. row ***************************
order_id: 1
stage: CHECKED
error_level: 2
stage_status: Audit Completed
error_message: Must start as begin statement.
sql: CREATE DATABASE nacos
affected_rows: 0
sequence: 0_0_00000000
backup_dbname: NULL
execute_time: 0
sqlsha1: NULL
backup_time: 0
1 row in set (0.00 sec)
mysql> select version();
±-------------------------------------+
| version() |
±-------------------------------------+
| 5.7.10-TiDB-v1.3.0-79-gde837ca-dirty |
±-------------------------------------+
1 row in set (0.00 sec)
TiDB-v1.3.0 version? Probably no one has used it, right?
I followed the official documentation to set it up. Is it because of this command that the version was set too low?
了解如何快速上手使用 TiDB 数据库。
tiup cluster deploy ./topo.yaml --user root -p
What version should be filled in here? This is an ancient version, choose the latest one.
Does this mean version v7.1.2? Is this version also very old?
Hahaha, let’s change the version first.
It’s an ancient version, change it.
Should I run tiup cluster list
in the shell or select version()
in the database to confirm my current installed version?
Should I execute tiup cluster list
in the shell or select version()
in the database to confirm the version I currently have installed?
I’ll try upgrading to 7.5.0 first.
You don’t necessarily need to upgrade to 7.5.0. How did you install it, and why are the two versions you checked different?
I followed this installation guide. I’m also quite puzzled as to why the versions are different.
Can you check the deployment history commands on your Linux server using history? I feel like you made a mistake somewhere.
I executed the command in the red box in the middle and encountered an error. Could this be the cause?
It should be that you executed this which caused the impact. Why don’t you destroy the current cluster and follow the steps above again, and don’t make mistakes this time.
Okay, I’ll give it a try. Thanks.
Re-destroying and recreating might be faster than dealing with the issue~
You can check the version using select tidb_version();
. Using select version()
might give you a false result.