简体   繁体   English

Android设备到GCM消息“用户'root'@'localhost'的访问被拒绝”

[英]Android device to GCM message “Access denied for user 'root'@'localhost'”

I have an application that sends messages to GCM. 我有一个向GCM发送消息的应用程序。

In my local server I can send both upstream and downstream messages successfully. 在本地服务器中,我可以成功发送上游和下游消息。

But when I deployed my server to the cloud I am getting Access denied for user 'root'@'localhost' when I send upstream message. 但是,当我将服务器部署到云中时,发送上游消息时,用户'root'@'localhost'访问被拒绝。

I changed my Android api key to a server Api key but it made no difference. 我将我的Android api密钥更改为服务器Api密钥,但这没什么区别。

Since there are multiple layers on the whole thing I don't know where the issue is. 由于整个过程有多个层次,所以我不知道问题出在哪里。

I am able to SSH to my server from my local environment and can see all my mysql databases and tables but I can't access phpmyadmin from my browser. 我可以从本地环境通过SSH到服务器,并且可以查看我的所有mysql数据库和表,但无法从浏览器访问phpmyadmin。

My Instance in Google compute engine is also running. 我在Google计算引擎中的实例也正在运行。 But I noticed mysql is disabled though. 但是我注意到mysql被禁用了。

So I am suspecting maybe that is the cause since the error is thrown from mysql. 所以我怀疑这可能是原因,因为从mysql抛出了错误。

The problem was just I was using development server password. 问题是我正在使用开发服务器密码。 I am the using the right password and I am able to access mysql in my remote server. 我正在使用正确的密码,并且能够访问远程服务器中的mysql。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM