简体   繁体   English

oracle 11g xe的locahost是什么?

[英]What is the locahost for oracle 11g xe?

I'm doing a hibernate project for my final semester. 我正在为期末学期做一个休眠项目。 I don't know what to enter here in my project for the hibernate configuration file jdbc:oracle:thin:@localhost: :XE . 我不知道在我的项目中为休眠配置文件jdbc:oracle:thin:@localhost: :XE

localhost refers to your local machine. localhost是指您的本地计算机。 In the case you describe with Oracle, you need to specify the Oracle instance on your local machine. 如果您使用Oracle进行描述,则需要在本地计算机上指定Oracle实例。 By default Oracle runs on port 1521 eg localhost:1521 . 默认情况下,Oracle在端口1521上运行,例如localhost:1521

To solve your problem, you should update your jdbc connection string to include the port. 为了解决您的问题,您应该更新jdbc连接字符串以包括端口。

Thus, your connection string should look something like the following: 因此,您的连接字符串应类似于以下内容:

 jdbc:oracle:thin:@localhost:1521:XE

Here is the Oracle JDBC API doc. 是Oracle JDBC API文档。 It explains how to construct the connection url. 它说明了如何构造连接URL。

You are missing the port number. 您缺少端口号。 You have to see what port your database is using 您必须查看数据库正在使用的端口

jdbc:oracle:thin:@localhost:1525:XE

It is normally 1525 通常是1525

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

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