为什么在尝试使用 pymysql 运行 "Status" 后出现此 "You have an error in your SQL syntax;" 错误?

Why am I getting this "You have an error in your SQL syntax;" error after trying to run "Status" with pymysql?

这是我之前

的跟进

要检查某个用户是否需要 SSL,我目前的方法是以用户身份登录和 运行 状态并检查输出的 SSL 行 - 例如) -(SSL:未使用)

这是我必须这样做的代码

conn = pymysql.connect(...)

try:
    with conn.cursor() as cur:
        cur.execute("STATUS")
        print(cur.fetchAll())
finally:
    conn.close()

当我 运行 这个时,我收到这个错误 - “(1064, u"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 'STATUS' at line 1")”

我很困惑,因为 "STATUS" 是有效的 Mysql 语法 - 在通过 [= 连接到 Mysql 数据库后,我能够 运行 这个命令30=] linux 客户。熟悉 PyMysql/Python/Mysql 的人知道我需要对此查询进行哪些更改才能使其正常工作吗?

我尝试 运行 的命令是状态 - https://dba.stackexchange.com/questions/36776/how-can-i-verify-im-using-ssl-to-connect-to-mysql。但问题是该命令是客户端命令,而不是 SQL 查询。 "Show Status" 是一个 sql 查询。