在IE 有如下错误:com.ms.security.SecurityExceptionEx[data/MysqlData.jbInit]: cannot access "132.146.1.24":3306
at com/ms/security/permissions/NetIOPermission.check
at com/ms/security/PolicyEngine.deepCheck
at com/ms/security/PolicyEngine.checkPermission
at com/ms/security/StandardSecurityManager.chk
at com/ms/security/StandardSecurityManager.chkex
at com/ms/security/StandardSecurityManager.checkConnect
at java/net/Socket.<init>
at java/net/Socket.<init>
at org/gjt/mm/mysql/MysqlIO.<init>
at org/gjt/mm/mysql/jdbc1/IO.<init>
at org/gjt/mm/mysql/jdbc1/Connection.createNewIO
at org/gjt/mm/mysql/Connection.connectionInit
at org/gjt/mm/mysql/jdbc1/Connection.connectionInit
at org/gjt/mm/mysql/Driver.connect
at java/sql/DriverManager.getConnection
at java/sql/DriverManager.getConnection
at data/MysqlData.jbInit
at data/MysqlData.init
at com/ms/applet/AppletPanel.securedCall0
at com/ms/applet/AppletPanel.securedCall
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run
java.sql.SQLException: Cannot connect to MySQL server on 132.146.1.24:3306. Is there a MySQL server running on the machine/port you are trying to connect to? (com.ms.security.SecurityExceptionEx)
at org/gjt/mm/mysql/Connection.connectionInit
at org/gjt/mm/mysql/jdbc1/Connection.connectionInit
at org/gjt/mm/mysql/Driver.connect
at java/sql/DriverManager.getConnection
at java/sql/DriverManager.getConnection
at data/MysqlData.jbInit
at data/MysqlData.init
at com/ms/applet/AppletPanel.securedCall0
at com/ms/applet/AppletPanel.securedCall
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run

解决方案 »

  1.   

    1:  com.ms.security.SecurityExceptionEx[data/MysqlData.jbInit]: cannot access "132.146.1.24":33062:  java.sql.SQLException: Cannot connect to MySQL server on 132.146.1.24:3306. Is there a MySQL server running on the machine/port you are trying to connect to? 试图连接数据库但没成功,应该是安全限制问题。我想你因该通过数字签名授权来达到目的。但不好意思,我没做过,所以,建议你看看有关签名的资料!
      

  2.   

    mysql>grant all privileges on *.* to root@"%" identified by "XXX"; 
    //XXX is root's password但这样做不安全,最好不要用root, 另建用户,需要什么权限,设什么权限
      

  3.   

    最好是在服务器端做个程序对数据库进行操作,在Applet端只管发送操作的参数和接受返回的结果
      

  4.   

    to z_yheart(年轻的心):
      是个好方法,再多给一点提示行吗!
      

  5.   

    IE的Internet选项里,选安全-自定义级别,在设置里的Microsoft VM的java permissions里选Custom,下面会多出一个按钮(java自定义设置),点进去Edit permissions,找相关的选项,enable就行了(如果闲麻烦,就全Enable吧)
      

  6.   

    对了,还有,你的applet要放到一个web server上,IIS就可以在java自定义设置中将access to all network address
    设置为enable相信我,如果你的applet没问题,如果你的IE可以看swing作的applet,修改完了一定能运行z_yheart(年轻的心)说得也不错,实现起来方法也不少,你可以用servlet,
    不然用socket,RMI都可以不过尽管如此,你还是要用上面的方法修改你IE的安全选项(只要你涉及到用IP来连接),因为IE默认是applet不能访问除127.0.0.1外的其他IP的
      

  7.   

    tails 的方法可以解决问题,
    今天我也遇到了相同的问题,刚试过了,问题解决了^_^。
    我的后台数据库用的是sybase,我觉得这样访问数据库的确不安全。
      

  8.   

    to tails(小狐狸):在java自定义设置中将access to all network address
    设置为enable
       在哪里设置;搞定一定给分!!!!!请问有没有oralce的jdbc的驱动包。