我找了很多东西,但没能解决那个问题。我能够访问运行在不同windows机器上的MySQL服务器。我已经采取的步骤是
将my.ini文件绑定地址更改为0.0.0.0
创建用户并由GRANT ALL PRIVILEGES ON DATABASE.* TO user@'%' IDENTIFIED BY 'password';授予权限
从命令行到windows MySQL server mysql -h windows server ip -u user -p
它工作得很好,在MySQL工作台上,我可以从我的机器连接到windows MySQL服务器
# -*- coding: utf-8 -*-
import MySQLdb
import sitedb
for i in range(5):
print i
cred = sitedb.loadmysqlcredential()
db = MySQLdb.connect(host = cred["host"], user = cred["user"], passwd = cred["passwd"], db = "vg_site_db", charset = 'utf8')
db
我用vs2017创建了一个c++ linux项目。我设置了一个到WSL (linux的windows子系统)的连接。当我构建或尝试调试时,我得到以下错误:
Current project architecture ‘x64’ is incompatible with the remote system architecture ” (‘Unknown’). Please switch the project architecture to ” in Configuration Manager
如何解决这个问题呢?