Archery icon indicating copy to clipboard operation
Archery copied to clipboard

无法获取回滚数据,回滚提示中的数据库连接地址有误

Open huoshenyingmu opened this issue 2 years ago • 1 comments

重现步骤

[2023-01-10 09:36:33,874][MainThread:140698735875904][task_id:default][mysql.py:357][WARNING]- MySQL语句执行报错,语句:explain show tables;,错误信息Traceback (most recent call last): File "/opt/archery/sql/engines/mysql.py", line 341, in query effect_row = cursor.execute(sql) File "/opt/venv4archery/lib/python3.9/site-packages/MySQLdb/cursors.py", line 206, in execute res = self._query(query) File "/opt/venv4archery/lib/python3.9/site-packages/MySQLdb/cursors.py", line 319, in _query db.query(q) File "/opt/venv4archery/lib/python3.9/site-packages/MySQLdb/connections.py", line 259, in query _mysql.connection.query(self, query) MySQLdb._exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'show tables' at line 1")

[2023-01-10 09:41:18,543][MainThread:140698735875904][task_id:default][goinception.py:263][ERROR]- 获取回滚语句报错,异常信息Traceback (most recent call last): File "/opt/archery/sql/engines/goinception.py", line 248, in get_rollback cur.execute(sql_table) File "/opt/venv4archery/lib/python3.9/site-packages/MySQLdb/cursors.py", line 206, in execute res = self._query(query) File "/opt/venv4archery/lib/python3.9/site-packages/MySQLdb/cursors.py", line 319, in _query db.query(q) File "/opt/venv4archery/lib/python3.9/site-packages/MySQLdb/connections.py", line 259, in query mysql.connection.query(self, query) MySQLdb.exceptions.OperationalError: (1142, "SELECT command denied to user 'archery'@'127.0.0.1' for table '$$inception_backup_information$$'")

[2023-01-10 09:41:18,544][MainThread:140698735875904][task_id:default][views.py:281][ERROR]- Traceback (most recent call last): File "/opt/archery/sql/engines/goinception.py", line 248, in get_rollback cur.execute(sql_table) File "/opt/venv4archery/lib/python3.9/site-packages/MySQLdb/cursors.py", line 206, in execute res = self._query(query) File "/opt/venv4archery/lib/python3.9/site-packages/MySQLdb/cursors.py", line 319, in _query db.query(q) File "/opt/venv4archery/lib/python3.9/site-packages/MySQLdb/connections.py", line 259, in query mysql.connection.query(self, query) MySQLdb.exceptions.OperationalError: (1142, "SELECT command denied to user 'archery'@'127.0.0.1' for table '$$inception_backup_information$$'")

连接的数据库地址有问题,不是inception/config.toml中配置的地址,也不是配置项中的地址

预期外的结果

没有连接成功

日志文本

No response

版本

1.9.1

部署方式

Docker

是否还有其他可以辅助定位问题的信息?比如数据库版本等

MySQL: 5.7.26

huoshenyingmu avatar Jan 10 '23 03:01 huoshenyingmu

错误日志并没有连接信息,回滚语句会去查页面配置的数据库

hhyo avatar Feb 25 '23 05:02 hhyo