我在google cloud上创建了一个tomcat堆栈实例,它附带了MySQL5.5。我可以通过终端通过ssh访问它,然后输入命令行mysql -u username -p。然而,我试图通过mysqlworkbench访问数据库,但我无法获得连接。
因此,我想我需要使用"Standard TCP/IP over SSH“连接方法,并且我需要确认我的参数是否正确。
SSH Hostname: the IP of my instances <br/>
SSH Username: my google account username? this is the one i use to login when setting up the gcloud ssh<br/>
SSH Password: the password for the account<br/>
SSH Key file: ~/.ssh/google_compute_engine<br/>
MySQL Hostname: i put tomcat_rmre which is the hostname for the database when I do "show variables" in the terminal<br/>
MySQL Server Port: the port in "Show variables"<br/>
Username: username of the database<br/>
password: password of the database当我测试连接时,我得到Lost connection to MySQL server at 'reading initial communication packet', system error: 0
发布于 2015-09-26 03:34:30
Tomcat Click to Deploy解决方案不使用Cloud SQL,它只包含在Google Compute Engine上运行的MySQL。
如果您无法通过标准(TCP/IP)连接方式远程连接到MySQL实例,可能是由于以下原因之一:
bind-address = 0.0.0.0,而不应包含skip-networking.https://stackoverflow.com/questions/30626170
复制相似问题