gpt4 book ai didi

mysql - angular2-meteor 应用程序的错误 :failed connection to mysql via meteor

转载 作者:行者123 更新时间:2023-11-29 21:13:04 34 4
gpt4 key购买 nike

我正在尝试使用nodets:mysql与meteor连接到mysql数据库,但我遇到了这个错误:

Unhandled rejection Error: No infromation can be fetched by your database, please check your permissions

这是我的代码部分:

Meteor.startup(function() {

//Start of changes

var connectionSettings = {
host: '127.0.0.1',
user: 'root',
password: '',
database: 'test'
};

var db = Mysql.connect(connectionSettings);
})

最佳答案

我需要添加mysql的端口Meteor.startup(function() {

//Start of changes

var connectionSettings = {
host: '127.0.0.1',
port : (mysqlport),
user: 'root',
password: '',
database: 'test'
};

var db = Mysql.connect(connectionSettings);

})

关于mysql - angular2-meteor 应用程序的错误 :failed connection to mysql via meteor,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36205181/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com