networking - MySQL server accessible through public ip but not through internal ip -


i have 2 servers running @ business. first 1 runs mysql server , dedicated mysql. ip address 192.168.1.2 , second server runs wordpress on apache , acts reverse proxy nodejs. it's ip 192.168.1.15 when try access mysql server using public ip 192.168.1.15 works fine. when try access server using internal ip 192.168.1.2 says cannot connect mysql server.

ex1 root@192.168.1.15->mysql -u xxxx -h [public ip] -p root@192.168.1.15->mysql-> login success  ex2 root@192.168.1.15->mysql -u xxxx -h 192.168.1.2 -p cannot connect mysql server error 

when try access wordpress website says

error establishing database connection 

and can't use nodejs website cause uses mysql login users

both nodejs server , wordpress uses 192.168.1.2 host mysql server

how can fix this?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -