简体   繁体   English

如何设置mysql远程服务器数字海洋

[英]How to setup mysql remote server digital ocean

I have two instances running in digital ocean. 我有两个在数字海洋中运行的实例。

Instance #1: 实例1:

Running NodeJS MySQL grunt for web application. 针对Web应用程序运行NodeJS MySQL grunt。

'connection': {
    'host': '`ip-address-for-instance-2`',
    'user': 'root',
    'password': '`password`'
},

Instance #2: 实例2:

Running phpmyadmin by 'instance-2-ip/phpmyadmin' 通过'instance-2-ip / phpmyadmin'运行phpmyadmin

I had edit my.cnf bind address with my instance's 2 IP address. 我用实例的2 IP地址编辑了my.cnf绑定地址。

bind-address=`ip-address`

When I grunt my web application: 当我浏览我的Web应用程序时:

Error: connect ETIMEDOUT 错误:连接ETIMEDOUT

Try this each connector has an optional "address" attribute 试试这个,每个连接器都有一个可选的“地址”属性

tomcat/conf/server.xml. tomcat / conf / server.xml。

Specify a bind address for that connector: 指定该连接器的绑定地址:

<Connector 
    port="8080" 
    protocol="HTTP/1.1" 
    address="127.0.0.1"
    connectionTimeout="20000" 
    redirectPort="8443" 
  />`

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

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