收藏
回答

腾讯云demo三木聊天室登录时收到错误提示

按照说明来部署腾讯云,但登录时收到了这样的信息。是说mysql的无法授权么?

这个比较奇怪, 因为通过浏览器单独访问是没有问题的。



LoginError {type: "ERR_LOGIN_MISSING_SESSION", message: "{"code":-1,"error":"ERR_WHEN_INSERT_TO_DB\nError: …r user 'root'@'localhost' (using password: YES)"}"}message: "{"code":-1,"error":"ERR_WHEN_INSERT_TO_DB\nError: ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password: YES)"}"type: "ERR_LOGIN_MISSING_SESSION"__proto__: Error


    at http://1783067285.appservice.open.weixin.qq.com/vendor/wafer2-client-sdk/lib/login.js:18:28

    at http://1783067285.appservice.open.weixin.qq.com/vendor/wafer2-client-sdk/lib/login.js:22:2

    at require (http://1783067285.appservice.open.weixin.qq.com/appservice:26:21982)

    at http://1783067285.appservice.open.weixin.qq.com/appservice:26:21731

    at http://1783067285.appservice.open.weixin.qq.com/vendor/wafer2-client-sdk/index.js:4:13

    at require (http://1783067285.appservice.open.weixin.qq.com/appservice:26:21982)

    at http://1783067285.appservice.open.weixin.qq.com/appservice:26:21731

    at http://1783067285.appservice.open.weixin.qq.com/app.js:7:14

    at require (http://1783067285.appservice.open.weixin.qq.com/appservice:26:21982)

    at http://1783067285.appservice.open.weixin.qq.com/appservice:37:9


/server/config.js

mysql: {
host: 'localhost',
port: 3306,
user: 'root',
db: 'cAuth',
pass: 'xxxxxxxxxxxxxx',//密码没有问题,已经通过腾讯云验证
char: 'utf8mb4'
},


/client/config.js

var host = 'xxxxxxxxxx';
 
var config = {
 
// 下面的地址配合云端 Demo 工作
service: {
host,
 
// 登录地址,用于建立会话
loginUrl: `https://${host}/weapp/login`,
 
// 测试的请求地址,用于测试会话
requestUrl: `https://${host}/weapp/user`,
 
// 测试的信道服务地址
tunnelUrl: `https://${host}/weapp/tunnel`,
 
// 上传图片接口
uploadUrl: `https://${host}/weapp/upload`
}
};


回答关注问题邀请回答
收藏

13 个回答

  • 2017-09-13

    Jason你好,通过腾讯云后台进入 phpMyAdmin是没有任何问题的。

    2017-09-13
    有用
    回复
  • Jason
    Jason
    2017-09-13

    是开发环境吗?使用的是 appid 作为 MySQL 密码了吗?

    您可以通过腾讯云后台进入 phpMyAdmin 测试一下。

    2017-09-13
    有用
    回复
  • 2017-09-01

    把域名和pass省略。通过浏览器验证时没有问题的,很奇怪。

    2017-09-01
    有用
    回复

正在加载...

登录 后发表内容