无法从RIDE连接到MySQL数据库

2024-05-15 08:58:06 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试使用下面的语句从Ride(Robotframework)连接到Mysql数据库

Connect To Database Using Custom Params    pymysql    'pbds120_NO_RSA','username','password','10.x.x.x',3306

但是我得到了一个错误:2003, "Can't connect to MySQL server on 'pbds120_NO_RSA' ([Errno 11001] getaddrinfo failed)

有人知道这个错误吗?你知道吗


Tags: tono数据库connect错误custommysqlparams
1条回答
网友
1楼 · 发布于 2024-05-15 08:58:06

关键字调用被解析为要连接到的主机名是“pbds120\u NO\u RSA”,而您似乎要连接到“10.x.x.x”。你知道吗

检查documentation of the library-显式命名不同的参数:

Connect To Database Using Custom Params    pymysql    database='pbds120_NO_RSA', user='username', password='password', host='10.x.x.x', port=3306

相关问题 更多 >