按照说明来部署腾讯云,但登录时收到了这样的信息。是说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`}}; |

点击安装依赖
报错是因为服务端没有这个依赖吧
我这边也是同样的问题,有php版本的好调通,用node版本的一直没有通
安装依赖,一定不要忘了
还是解决不了, 。。。。。
@林超,是呀。
这次是因为我重新下载了代码包后,忘记安装依赖。
但奇怪的是,上次安装了依赖,但服务器拒绝登录。
总之,解决就好:)
刚刚我尝试通过开发工具重新上传部署代码到腾讯云,收到如下的错误提示:![]()
Hi Jason, 我目前使用的是开发环境,而且确认密码没有问题。
还是不太明白出错的原因以及解决方式。
您好,如果是开发环境,请检查密码是否正确,并且需要重新把代码部署到服务器上。
如果是生产环境,您需要进入 phpMyAdmin,然后复制数据的 IP 地址,接着填写到 server/config.js 文件的 mysql.host 里面,不然程序是找不到数据库的连接地址的。因为生产环境是我们提供的云数据库,不能直接填写 localhost 连接
hi Json, 依然无法访问。我还尝试重新修改phpMyAdmin的密码,虽然在浏览器是可以成功登录,但依然在小程序出现报错:
嗯,这边已经处理了,请重试一下。