在Linux操作系统中安装MySQL连接器for Python 2.7.9后出现错误。pip安装mysql-connector-python安装错误
Command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-5nxFZ_/mysql-connector-python-rf/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-qLvsiw-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-5nxFZ_/mysql-connector-python-rf
Storing debug log for failure in /home/pi/.pip/pip.log
搜索了很多关于这个错误无法找到一个满意的解决方案,请帮我弄清楚这个错误。
谢谢。 :)
使用上述命令感谢您@Exprator我已成功连接到本地Mysql,但连接到远程Mysql服务器时出现错误。 “远程主机是CentOS,试图授予远程主机授予权限,因为OperationalError为” –
“,因此您需要为远程主机授予权限,以便它可以从其他端口连接,无论如何,我看到您已经接受某人的答案,希望你可以连接到远程:) – Exprator
不,通过使用上面的评论我可以连接到本地MySQL服务器,而不是远程MySQL服务器。 –