我正在尝试从Wakanda 11连接到MAMP MySQL数据库。
我尝试使用连接到远程数据存储区连接到localhost数据库,但我一直收到Connection failed
响应。我也尝试使用它连接的端口127.0.0.1:8081
,但是在尝试使用port:3306
时没有尝试使用,这是我在MAMP服务器上配置MySQL数据库的地方。我做错了什么?
我尝试过以下脚本......
model.addSQLCatalog("mysqldb", {
hostname: '127.0.0.1',
port: 3306,
user: 'root',
password: 'xxxxxxxx',
database: 'my_database_name',
ssl: false,
dbType: 'mysql'
});
...但是这给了我以下错误:
TypeError:JSON.stringify无法序列化循环结构。
如何修复并使其在端口上运行:3306所以我可以看到我的数据库结构?
答案 0 :(得分:1)
如果您使用的是Wakanda Enterprise Edition 11或更高版本,则会有MySQL Connector Pro。
以下是与此相关的示例:
ID1 ID2 ID3 ID4 ID5 ID6
1 9 0 1
5 0 1 9 0 1
如果您使用的是较旧版本的Wakanda Enterprise Edition但仍使用版本7或更高版本,则会有Wakanda/MySQL connector。
以下是使用连接器连接MySQL的示例:
cbind(read.fwf(file = textConnection(as.character(df[,1])), widths = c(1, 1, 1, 1, 1, 1, 2),
colClasses = "character", col.names = c("ID1", "ID2", "ID3", "ID4", "ID5", "ID6", "ID7")))
以下是可用参数的示例:
model.mergeSQLCatalog(localName, {
hostname: string 'host name',
port: number remote_port_number,
user: string 'userName',
password: string 'password',
database: string 'SQL database name',
jsFile: string 'configuration JavaScript file',
ssl: boolean true or false,
dbType: string 'mysql' } )
答案 1 :(得分:0)
如果我说得对,你的问题已经解决了?它适用于Windows和Windows吗?苹果电脑 ?
要恢复使用ProCOnnector,您需要:
model.js
文件中使用addSQLCatalog()
API。请注意,在Wakanda的下一个版本中,我们将向wizzard提供连接到其他数据库而不是addSQLCatalog()
。这将有助于简化流程。