再虚拟机内 rhc port-forward <app-name>

此时,可以在本机 访问 127.0.0.1:8080  登陆 网页, 3306连接sql

https://unix.stackexchange.com/questions/111433/iptables-redirect-outside-requests-to-127-0-0-1

https://serverfault.com/questions/551361/redirect-incoming-packets-to-loopback/702685

按上述将

sysctl -w net.ipv4.conf.eth0.route_localnet=1

然后 
http://forums.justlinux.com/showthread.php?136144-SOLVED-hosts-file-redirecting-a-outgoing-ip-address-to-localhost

sudo iptables -t nat -A PREROUTING -d 192.168.252.30 -j DNAT --to-destination 127.0.0.1

sudo iptables -t nat -A OUTPUT -d 192.168.252.130 -j DNAT --to-destination 127.0.0.1

发现  可以在虚拟机内  用  虚拟机的eth0 的ip 地址:8080  访问了,,但主机上仍然不行    http://192.168.252.130:8080/

尝试

http://www.linuxidc.com/Linux/2012-06/63520.htm

iptables -t nat -A PREROUTING -p tcp --dport 8080 -j DNAT --to-destination 127.0.0.1:8080

remote connect openshift mysql的更多相关文章

  1. 连接mysql问题 mysqlnd cannot connect to MySQL 4.1+ using old authentication

    第一篇:PHP5.3开始使用MySqlND作为默认的MySql访问驱动,而且从这个版本开始将不再支持使用旧的用户接口链接Mysql了,你可能会看到类似的提示: #2000 - mysqlnd cann ...

  2. perationalError: (2003, "Can't connect to MySQL server on u'192.168.1.6' (timed out)")

    在Ubuntu(192.168.1.20)中部署项目后,mysql还在另外一台windows(192.168.1.6)机子上,ping windows时可以ping通,但是访问项目提示: perati ...

  3. 2003-Can't connect to mysql server on localhost (10061)

    mysql数据库出现2003-Can't connect to mysql server on localhost (10061)问题 解决办法:查看wampserver服务器是否启动,如果没有启动启 ...

  4. ERROR 2003 (HY000): Can't connect to MySQL server on 'ip address' (111)的处理办法

    远程连接mysql数据库时可以使用以下指令 mysql -h 192.168.1.104 -u root -p 如果是初次安装mysql,需要将所有/etc/mysql/内的所有配置文件的bind-a ...

  5. can't connect to mysql server on 'localhost'(10061)

    在linux下安装Navicat,想说在windows下试一试phpmyadmin之外的mysql图形工具. 显示下载安装了mysql workbench,链接成功.然后又弄了一下输入法重启,想说试一 ...

  6. 解决Can't connect to MySQL server on 'localhost' (10048)

    解决Can't connect to MySQL server on 'localhost' (10048) 您使用的是Windows操作系统,此错误与一个注册表键值TcpTimedWaitDelay ...

  7. MySQL问题记录--Can't connect to MySQL server on localhost (10061)解决方法

    本文mysql的安装环境为win7 64位,mysql版本为MySQL5.7 问题描述:在命令行输入 mysql -u root -p 登录mysql,返回"Can't connect to ...

  8. ruby使用DBI连接MySQL数据库发生异常:in `error': Can't connect to MySQL server on 'localhost' (10061) (DBI::DatabaseError)

    Ruby使用DBI连接MySQL数据库一般为: require "dbi" dbh = DBI.connect("dbi:Mysql:test:localhost&quo ...

  9. mysqlnd cannot connect to MySQL 4.1+

    phpMyAdmin - error #2000 - mysqlnd cannot connect to MySQL 4.1+ using the old insecure authenticatio ...

随机推荐

  1. 自定义AlertView(Swift)

    MyAlertView.swift // Pop Up Styles enum MyAlertViewStyle: Int { case success case error case notice ...

  2. 算法复习——扫描线(hdu1542)

    题目: Problem Description There are several ancient Greek texts that contain descriptions of the fable ...

  3. 代码动态改变 NGUI UILabel 的字体

    有一次因为 ttf 分成简体和繁体两个..所以就需要动态改变NGUI 中 UILabel 的字体,但是不知道 UILabel 保存字体的字段是哪个 网上搜到..在这里记录一下 using UnityE ...

  4. Tomcat和JVM的内存配置

    原文路径:https://www.cnblogs.com/pangxiansheng/p/5378537.html JVM内存分配设置的参数有四个 -Xmx Java Heap最大值,默认值为物理内存 ...

  5. HDU 2594 kmp算法变形

    Simpsons’ Hidden Talents Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java ...

  6. 洛谷P1372 a/b problem

    题目背景 “叮铃铃铃”,随着高考最后一科结考铃声的敲响,三年青春时光顿时凝固于此刻.毕业的欣喜怎敌那离别的不舍,憧憬着未来仍毋忘逝去的歌.1000多个日夜的欢笑和泪水,全凝聚在毕业晚会上,相信,这一定 ...

  7. VirtualBox 與 Vmware 差異

    VirtualBox 4.3.36_Ubuntu r105129 與 VMware® Workstation 12 Player  12.5.2 build-4638234, 分別在各自的 Ubunt ...

  8. Ubuntu16 编译源码出错 unsupported reloc 43

    错误如下 prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/include/c++/4.6/bits/basi ...

  9. js-百度地图多个标注点

    以成都华誉口腔3个门诊部为例,锦江区-青羊区-高新区 html: <div class = "demo_main"> <fieldset class = &quo ...

  10. js-className修改class属性

    1.修改className 1)修改class类名为p-a-0 2)在保留class="p1"的基础上再添加一个类名为p-a-0 2.删除className 1).结果需删除cla ...