简体   繁体   English

sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) ([Errno 13] Permission denied)")

[英]sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) ([Errno 13] Permission denied)")

I'm trying to connect to mysql using below我正在尝试使用以下方法连接到 mysql

engine = create_engine("mysql+pymysql://user:pwd@localhost/test")
connection = engine.connect()

it works while in local and when deployed the code in one of our linux box, am getting它在本地工作,当在我们的 linux 盒子之一中部署代码时,我得到了

sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'xxx.xx.xx.xxx' ([Errno 13] Permission denied)") sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError)(2003,“无法连接到‘xxx.xx.xx.xxx’上的 MySQL 服务器([Errno 13] 权限被拒绝)”)

I checked the user privileges and the user has all the necessary privileges.我检查了用户权限,用户拥有所有必要的权限。

using the same user and am able to connect from python terminal from the same linux box but it doesnt work using the python code.使用相同的用户,并且能够从同一个 linux 盒子的 python 终端连接,但它不能使用 python 代码。

Any suggestions if am missing anything?如果遗漏了什么,有什么建议吗?

I figured out the issue.我想通了这个问题。

The issue was the http.network connect policy was disabled for apache and it worked when we enabled it.问题是 apache 的 http.network 连接策略被禁用,当我们启用它时它起作用了。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 sqlalchemy.exc.OperationalError:(pymysql.err.OperationalError)(1045,“用户'root'@'localhost'的访问被拒绝(使用密码:是)”) - sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1045, "Access denied for user 'root'@'localhost' (using password: YES)") sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') - sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query') 金字塔:sqlalchemy.exc.OperationalError - Pyramid: sqlalchemy.exc.OperationalError 识别 sqlalchemy.exc.OperationalError - Identifying sqlalchemy.exc.OperationalError SQLAlchemy 和烧瓶 (sqlalchemy.exc.OperationalError:) - SQLAlchemy and flask (sqlalchemy.exc.OperationalError:) (pymysql.err.OperationalError)(2003,“无法连接到‘0.0.0.0’上的 MySQL 服务器([Errno 111] 连接被拒绝)”) - (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on '0.0.0.0' ([Errno 111] Connection refused)") sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) 没有这样的表:用户 - sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: user sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) 没有这样的表:项目 - sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: items sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) 没有这样的表 - sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table SQLAlchemy.exc.OperationalError : (sqlite3.OperationalError) 没有这样的表:用户 - SQLAlchemy.exc.OperationalError : (sqlite3.OperationalError) no such table: user
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM