SQL Developer doesn't connect using Hostname of my machine - oracle-sqldeveloper

I'm not able to connect to local oracle database from SQL Developer when I'm giving my computer hostname for "Hostname" field in SQL Developer connection.
Database and SQL Developer are running on the same machine.
SQL Developer was able to connect when hostname are replaced with following:
localhost --localhost as hostname is working
127.0.0.1 --This is working as well
192.168.0.5 --Static IP Configured for machine is working
10.10.10.10 --Loopback configured for machine is working
Attached files showing following info:
"Config files details" : hosts, tnsnames.ora, listener.ora, sqlnet.ora
"SQL Developer and Network adapter details" : Network adapters used, Screen shots showing the SQL Developer connection details
My Machine is a standalone home PC, So, it doesn't have any domain name associated with it.
It is configured both loopback and Static-IP and hosts file reflects them appropriately.
My Home Wifi-Router is configured to assign Static-IP to my machine based on MAC-Address.
Resolving this is required because, I have used my computer hostname instead of IP-Address as source connection for some other application (Same machine), which i don't want to modify, as the static IP-Adress might need to be modified later and that would require to go to the other application again and again.
I've tried to delete and create the listener afresh, that didn't work !! Not sure, what's wrong with this Hostname.
Thanks,
Durga.
SQL Developer and Network adapter details
Config files details
Edit: Also, weirdly enough, SQLPlus connects to the host when i give the password directly in connection string. However, it says TNS doesn't know of the service when i don't give password as part of connection string. (Attached the screen shot)
Screenshot showing the behaviour of SQLPlus With/Without password in connection string

Related

Cannot connect to MySQL Database in Workbench

It's my first time working with MySQL, so it's not much I know about it. I just installed MySQL Workbench client (no server) and attempted to connect to a MySQL database that exists on a different host.
I tried to connect to an external database and received an error. I used a Standard (TCP/IP) connection, entered an IP address for the other hosting machine, user name and password and clicked Test Connection. The error I am getting: "Failed to connect to MySQL at HostName with User. Unable to connect to localhost."
Why is it connecting to localhost if I entered a totally different IP? I don't have a localhost and I don't need it. Is there anything special that I have to do when I connect to a different server?

Is it possible to change the PostgreSQL hostname from localhost to IP address?

Sorry for the very elementary question.
I created a simple web app that connects with a database for learning.
PostgreSQL is using 13.
Right now, I'm running both the database and the application on my local PC, but I wanted to see if I could view this application from another PC.
The application will be created in C# and Blazor, and the connection to the database will be made using NpgSQL.
We can connect the application and database with localhost within the local PC, but we cannot connect with localhost from other PCs, so we want to change the host of PostgreSQL to an IP address.
I'm thinking of connecting a local PC (say A) and another PC (say B).
Connect the Lan cable directly to both PCs and place them under the same network.
Set the IP address temporarily as follows.
A is 192.168.1.1
B is 192.168.1.10
In this case, if I set the database connection string in the application to 192.168.1.1, am I correct in understanding that I can reference the database from both PC(A) and PC(B)?
Sorry I don't have the environment to verify this right now.

App smith connectivity with local database

I have had an issue accessing the local database from Appsmith(docker container or signup from their website https://www.appsmith.com/).
I couldn't connect to my local database.
It sometimes says it can't connect to the specified localhost:5432 and asks me to "Failed to initialise pool. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections" How to solve this?
Method 1:
Actually, one has to tunnel the local database and the Appsmith using tools such as ngrok(ngrok is a cross-platform application that enables developers to expose a local development server to the Internet with minimal effort. The software makes your locally-hosted web server appear to be hosted on a subdomain of ngrok.com) And use that URL as the hostname.
Method2:
When running both the Appsmith and database in docker containers, one has to give the hostname as your database docker container's IP address.

pgAdmin 4. Unable to connect to server

I had a postgreSQL server/database working in a local area network in Windows. To have access to it through Ethernet I changed the IP in the router settings. Everything was fine. But when I came today to the office, I could not have connected to the server. Moreover, I cannot even create a localhost server on that PC. The error is "Unable to connect to server:" and nothing else. When I turn off the postgres in services it specifies the error with TCP/IP, port, etc. But not when the service is on. When connecting to the server, the pgAdmin asks for the postgres password. Endlessly, thou the password is printed correctly and the METHOD is set to trust. The reinstallation did not help.
What does this error mean? And what is the cure?

PGAdmin III cannot connect AWS RDS

I am trying to connect AWS RDS PostgreSql from PgAdmin 3. I followed the below link
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToPostgreSQLInstance.html
In Security Group, I also added PostgreSQL and All traffic as below
The "publicly accessible" flag was enabled (updated after Mark B's comment)
I got the error from PGAdmin3
Very appreciate for any suggestion
******UPDATE*******
I can connect pgAdminIII to AWS RDS successfully using home wifi, but cannot connect using office wifi.
My concern is:
Was the port 5432 blocked by office wifi?
How can I configure/update the port without impacting to current API?
Note: My current API is working well (CRUD)
Can you can test your connection to a DB instance using common Linux or Windows tools first?
From a Linux or Unix terminal, you can test the connection by typing the following (replace with the endpoint and with the port of your DB instance):
$nc -zv DB-instance-endpoint port
For example, the following shows a sample command and the return value:
$nc -zv postgresql1.c6c8mn7tsdgv0.us-west-2.rds.amazonaws.com 8299
Connection to postgresql1.c6c8mn7tsdgv0.us-west-2.rds.amazonaws.com
8299 port [tcp/vvr-data] succeeded!
Windows users can use Telnet to test the connection to a DB instance. Note that Telnet actions are not supported other than for testing the connection. If a connection is successful, the action returns no message. If a connection is not successful, you receive an error message such as the following:
C:>telnet sg-postgresql1.c6c8mntzhgv0.us-west-2.rds.amazonaws.com
8299
Connecting To sg-postgresql1.c6c8mntzhgv0.us-west-2.rds.amazonaws.com...Could not
open connection to the host, on port 819: Connect failed
If Telnet actions return success, then you are good to go.
If you are trying to access it from a network which is not listed for that port. you need to add inbound rules for those network IPs from AMAZON RDS system
You will also need to set Public accessibility true under Connect & security tab in RDS console.
Read this post.In your security group go to unbound rules and add my ip.
and make sure your database is public.
https://serverfault.com/questions/656079/unable-to-connect-to-public-postgresql-rds-instance