我是Oracle SQL Developer的新手,我正在尝试使我的数据库可以远程访问。我的数据库中有一个virtualbox设置,我可以通过我的OS和linux映像在My Sql Developer中访问它,但是很难让其他人进入。我想我可能没有正确配置它以允许其他用户访问它。我已经创建了用户名和密码,但是主机名和端口信息我没有正确设置或信息有误。主机名告诉我是localhost.localdomain,这似乎不正确。任何帮助将不胜感激。谢谢!
答案 0 :(得分:0)
主机端口需要转发到VM的端口。这是执行此操作的VBoxManage命令。
$VBoxManage modifyvm "Oracle Developer Days" --natpf1 "tns,tcp,127.0.0.1,1521,,1521"
然后'localhost'将在主机上运行
$ sqlplus system/oracle@//**<<<<hostip address>>>**:1521/orcl
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Sep 24 11:29:03 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select 1 from dual;
1
----------
1
然后由您的计算机的防火墙设置决定是否允许其他计算机在该端口上连接到主机。