注册

使用dmPython连接数据库时报错:dmPython.DatabaseError: [CODE:-2501]????????

Hjh 2022/09/18 3159 23

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:dm8_20220714_x86_win_64_ent
【操作系统】:windows10
【CPU】:Intel® Core™ i5-8265U CPU @1.60GHz
【问题描述】*:按照达梦官方文档进行dmPython的安装后,命令行和vscode中import dmPython均没有报错,但尝试用dmPython.connect连接本机数据库时,报错

dmPython.DatabaseError: [CODE:-2501]????????????? The above exception was the direct cause of the following exception: Traceback (most recent call last): File "dameng_io.py", line 3, in <module> conn = dmPython.connect('SYSDBA/SYSDBA@localhost:5236') SystemError: <class 'dmPython.Connection'> returned a result with an error set

python代码为官方文档中的代码

import dmPython conn = dmPython.connect('SYSDBA/SYSDBA@localhost:5236')

其中CODE[-2501]报错原因是> 用户名或密码错误
但我是用DM管理工具登录SYSDBA localhost@5236时没有出错,如下所示
1.PNG
因此想咨询一下要如何用dmPython连接到本地的DM8数据库呢

回答 0
暂无回答
扫一扫
联系客服