How can i find the host string of oracle 10g - mysql++

When I installed it and open SQL+, it is asking to enter the username, password and host string.
So, how can i know the host string of this.

Related

how to fix no pg_hba.conf entry for host "::1"

I'm standing up a new application and having some issues with host based authentication. I know there are other posts out there (espec this one) but nothing I try seems to work.
My error:
no pg_hba.conf entry for host "::1", user "root", database "db_name_here", SSL off
My pg_hba.conf file looks like:
# TYPE DATABASE USER ADDRESS METHOD
local all all peer map=usermap
local replication all peer map=usermap
hostssl all all all md5
host replication all all md5
I have a note to myself from the past where I said the following worked:
host db_name_here root ::1 trust
But it doesn't.
I've even tried:
all all all all trust
even that didn't work, same error.
I've read the postgresql docs, and while the helped explain what was going on, (and made me try hostnossl, to no avail) I'm still getting the same error.
Do you see my mistake?
Your pg_hba.conf entry is missing the netmask; a plain IP address is a syntax error. This one should work:
host db_name_here root ::1/128 trust
Don't use trust for anything but tests. As soon as you get that to work, replace it with a real authentication method like scram-sha-256.
Make sure you reload the database with
pg_ctl -D /path/to/datadir reload
and check the log file for errors (that is important, as a syntactically wrong file won't be loaded).
The alternative is to enable SSL on the server side and use it for the local connection.
The fastest way to connect would be via Unix sockets (if you are not on Windows or use the JDBC driver), perhaps that is the best thing to do.
Have you tried allow IPv6 localhost seperately like this
# TYPE DATABASE USER ADDRESS METHOD
host all all ::1/128 trust
Add sslmode=Require; and Trust Server Certificate=true; in your connection string.It will work for sure.
In my case, the DB is hosted on a different server and we get access credentials for the DB server. So, I only had to use sslmode:require while creating the connection string, like this
dbURI := fmt.Sprintf("sslmode=require host=%s port=%s user=%s dbname=%s password=%s", dbHost, dbPort, username, dbName, password)
log.Println("Postgres connection string: " + dbURI)
conn, err := gorm.Open("postgres", dbURI)
return conn

how to create first user in psycopg2

I am trying to connect PSYCOPG2, however it is my first time doing so and I haven't created any user. All tutorials I see supose I have already created one and I simply can't connect. I have seen that there is a default user for Postgres and I have tried the following codes and received the following errors:
conn = psycopg2.connect(database="postgres", user="postgres", password="postgres", port=5432)
Error FATAL: password authentication failed for user "postgres"
con = psycopg2.connect(database='postgres', user='postgres')
Error fe_sendauth: no password supplied
What else should I try, please?
Some installers ask for a password during installation (really is used for initialization of the database after installation of the software), then you need to specify this password to connect as the 'postgres' user, even from the local machine. This is common for Windows installers. If you don't remember what you told it, it might be easiest just to reinstall.
Linux installers are not likely to do this, they usually use 'peer' method with no password. But this only applies when you use a unix-domain socket to connect. Your python code suggests that that is what you are doing (since that is usually the default on linux when no host is provided), but the log-file message suggest you specified the host of ::1 to connect to.

Warning every time login remote server

The following warning shows up everytime when I login a remote server using ssh haifzhan#remote_server, anyone knows why and how to fix it?
Warning: the RSA host key for 'HOSTNAME' differs from the key for the IP address 'IP ADDRESS'
Offending key for IP in /home/haifzhan/.ssh/known_hosts:15
Matching host key in /home/haifzhan/.ssh/known_hosts:19
Are you sure you want to continue connecting (yes/no)?
My OS is centOS6
Delete "known_hosts" and log in again. It will ask you to reconfirm.
Or just remove line 15 using a text editor.
This type of problem occurs when the host is re-keyed (as in when a new OS may be loaded or when the server admin decides it's time to generate another key for security reasons). Or when some new machine grabs the IP address that you were previously using for another machine.

SSH connection issue on EC2

I have a really annoying problem with my server, even I couldn't find any search term to google it.
Let me explain it.
on my server I can connect to ssh using with ip address it is ok.
ex : ssh -p2222 ubuntu#xx.xxx.xxx.xx It is working.
but I cannot login with domain name. SSH connects, it asks for password for user ubuntu but the password doesn't work.
ex : ssh -p2222 ubuntu#domainname.com It is not working.
Be sure you use same EC2 Key Pair when you start your instance.

How to connect to Sybase Server/Database without port number using DSN or RapidSQL? Or how to find port number?

I have Some Sybase Server/Databases. I know 1. Server Name 2. Database Name 3. Username 4. Password. Using this I can connect using ISQL but while using RapidSQL it asks for port. I have existing application which uses DSN, while creating DSN also it asks for port. I am looking for 2 possiblies using RapidSQL/Creating DSN without port or How to find port mumber?
I do not have SQL.ini file.
Try this:
Go to start-> RUN -> type dsedit. There will be a mneu "Select
Directory Services"
Click ok on InterfacesDriver.
Highlight your server name on the left pane.
You will see its IP/Hostname and Port number on the right pane.
If isql works then the Sybase client must have the port number defined.
On Windows, I'd expect %SYBASE%\ini\sql.ini to contain a record for your server, and you'll see the port number.
(On Unix, $SYBASE/interfaces is the equivalent file.)
I don't know if it's possible but can RapidSql use a native Sybase connection? It sounds as if you're setting it up for ODBC?

Resources