Error in Creating Database Statement, Need Help

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 创建数据库语句报错,求助

| username: TiDBer_PYpX4QFC

[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)

| username: zhanggame1 | Original post link

TiDB-v1.3.0 version? Probably no one has used it, right?

| username: TiDBer_PYpX4QFC | Original post link

I followed the official documentation to set it up. Is it because of this command that the version was set too low?

| username: ShawnYan | Original post link

tiup cluster deploy ./topo.yaml --user root -p

What version should be filled in here? This is an ancient version, choose the latest one.

| username: TiDBer_PYpX4QFC | Original post link

Does this mean version v7.1.2? Is this version also very old?

| username: Hacker007 | Original post link

Hahaha, let’s change the version first.

| username: 大飞哥online | Original post link

It’s an ancient version, change it.

| username: TiDBer_PYpX4QFC | Original post link

Should I run tiup cluster list in the shell or select version() in the database to confirm my current installed version?

| username: TiDBer_PYpX4QFC | Original post link

Should I execute tiup cluster list in the shell or select version() in the database to confirm the version I currently have installed?

| username: Jolyne | Original post link

Both are fine.

| username: TiDBer_PYpX4QFC | Original post link

I’ll try upgrading to 7.5.0 first.

| username: Jolyne | Original post link

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? :thinking:

| username: TiDBer_PYpX4QFC | Original post link

I followed this installation guide. I’m also quite puzzled as to why the versions are different.

| username: Jolyne | Original post link

Can you check the deployment history commands on your Linux server using history? I feel like you made a mistake somewhere. :joy:

| username: TiDBer_PYpX4QFC | Original post link

I executed the command in the red box in the middle and encountered an error. Could this be the cause?

| username: Jolyne | Original post link

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. :joy:

| username: TiDBer_PYpX4QFC | Original post link

Okay, I’ll give it a try. Thanks.

| username: Billmay表妹 | Original post link

Re-destroying and recreating might be faster than dealing with the issue~

| username: 小龙虾爱大龙虾 | Original post link

You can check the version using select tidb_version();. Using select version() might give you a false result.

| username: heiwandou | Original post link

Upgrade the version.