Trouble connecting to Heroku DB with pgAdmin III client - database

I'm running into trouble connecting to a heroku database with pgAdmin3. I've filled out the Add Server options in pgAdmin3 as described in this question / answer. The error I receive is FATAL: password authentication failed for user "hliegpkjabvrpe". I can connect to the database with heroku pg:psql. When I look at the heroku logs -t, I don't see any trace of the failed login.
From the message it looks like pgAdmin3 is reaching the server, but denied. I've checked and double checked the password. I'm copying it directly from the heroku page showing the connection parameters.
Is there a place where I can get a more detailed description of why the authentication failed? Am I missing something obvious here?
I'm running pgAdmin3, version1.18 on windows 8. I have the heroku db name in the maintainance db slot, as described in the question / answer above. And I have ssl turned on. What am I missing?
Any help would be MOST appreciated!

In case you did't, you need to select "require" for SSL under SSL tab.

Try the credentials given by: heroku pg:credentials DATABASE

Related

Postgresql abnormal database system shutdown

I am very new to both aws ec2 instances and postgresql. I was able to get a database up and working for a web application mainly using the phppgadmin interface. Today I was working on my web app and was abruptly disconnected from the database. In my web app I got the error " pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused\n Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?" I now can't log in to phppg admin or connect to postgres from my ec2 instance command line. After inspecting the log file at /var/log/postgresql/postgresql-12-main.log I am seeing the error "FATAL: could not open file "global/pg_filenode.map": Permission denied" followed by "LOG: abnormal database system shutdown" I have my pg_hba.conf and postgresql.conf files are configured correctly as I have been doing work on this database for a few days now. Any help would be appreciated.
You or something else wrecked your PostgreSQL installation by changing permissions on or ownership of PostgreSQL files. On Windows and its interesting concepts of file locking, I'd suspect an anti-virus program, but you seem to be running some kind of Unix. Little more can be said with the little information in the question.

Prisma: "Can't reach database server" when trying to connect to digitalocean database

So I'm currently following this tutorial from DigitalOcean:
https://www.digitalocean.com/community/tutorials/how-to-build-a-graphql-api-with-prisma-and-deploy-to-digitalocean-s-app-platform
I created a postgres database hosted on digitalocean.
When I try to connect to it with the following command:
DATABASE_URL="postgresql://db:some_password#unique_identifier.db.ondigitalocean.com:25060/db?sslmode=require" npx prisma migrate deploy --preview-feature
and replace the DATABASE_URL with my personal Connection String it gives me the following error:
"Error: P1001: Can't reach database server at
app-0336e984censored29-do-user-10651-0.b.db.ondigitalocean.com:25060"
Please make sure your database server is running at
app-0336e984censored29-do-user-10651-0.b.db.ondigitalocean.com:`25060
What is going wrong? My Database is live and the link is also correct
i think that the problem is that until the app is built, there is no static IP and therefore no access to the database, see this article:
https://www.digitalocean.com/community/questions/why-managed-database-can-t-have-app-platform-as-trusted-source
i solve it by moving the migration command to the 'run' section, see image

Connecting Jitterbit to Heroku Postgre

I'm trying to connect to Heroku Postgre using Jitterbit Cloud Data Loader.
got my connection parameters all setup but unfortunately I run into an error FATAL: no pg_hba.conf entry for host "210.213.78.5", user "u49bh1311s0496", database "dfsj8qbgvj0ram", SSL off
Would like to ask for possible solution with this.
Thank you for your help.
Whenever I connect remotely to a Heroku Postgresql database, I need to have SSL on.
You'd typically connect using the heroku domain name instead of an IP as well.
Try this as your connection string:
jdbc:postgresql://210.213.78.5:5432/dfsj8qbgvj0ram?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory
with your username and password.

Error: Login failed. The login is from an untrusted domain and cannot be usedwith Windows authentication

I am working over LAN using sql server inside visual studio 2013. My server has an ip address of 192.168.0.19 and my client is 192.168.0.18 my port is 49170 which i configured at windows firewall. I connect the client into the ip address of the server but i always end up on getting the Error: Login failed. The login is from an untrusted domain and cannot be usedwith Windows authentication. I use windows authentication because i haven't set a username and a password through my installation. I think im getting the error because i must use the Sql Server Authentication. But how? I dont know what to enter on username and password. Please help. Thanks!
I had this problem today, and it was caused by my Active Directory account being locked out.
Yeah... perhaps the error message should've made that a little clearer !
To check if this is the cause for you, simply open a Command Prompt and run:
net user YourUsername /domain
For example: "net user jsmith /domain".
If your account is locked, it'll report this in the results.
I had the same issue recently. My account was not locked out, but my password had expired whilst I had an RDP session open (this session stayed open for days). Thus I could access the local SQL (on the RDP box) but when I tried to connect to a remote server in SSMS, I got the same error.
When I tried to RDP into the remote server, I then got a usable error message to the tune of... 'Your password has expired; change it or contact an admin'.
I change the password in my open RDP session; thereafter, I could login directly to the remote server, and could access it via SSMS in my open session.
Note: If I'd run the NET USER command as Mike suggests, I would have been able to see that the password expired the previous day:
To solve this you can disable the loopback check by adding a registry entry as follows:
Edit the registry using regedit. (Start –> Run > Regedit )
Navigate to: HKLM\System\CurrentControlSet\Control\LSA
Add a DWORD value called “DisableLoopbackCheck”
Set this value to 1
If above doesn’t solve the issue, we need to create SPNs for SQL Service account. While searching for SETSPN.exe command I came across this nice tool which can help a lot of pain like syntax error etc. is called as “Microsoft® Kerberos Configuration Manager for SQL Server®” which can be downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=39046
The best piece about this tool is that it can help in finding missing SPN and provide script to run or fix it directly, if you have permission. Basically, it can
Gather information on OS and Microsoft SQL Server instances installed on a server.
Report on all SPN and delegation configurations on the server.
Identify potential problems in SPNs and delegations.
Fix potential SPN problems.
Taken from - https://blog.sqlauthority.com/2017/04/18/sql-server-login-failed-login-untrusted-domain-cannot-used-windows-authentication/

No Login for SQL Server but I am Local Admin

I am a local Admin on my machine. Same old thing, my account wasnt added when SQL Server was installed, and I don't want to have to reinstall SQL Server. I went through this blog and it worked until I tried to log and run the commands via SQLCMD or SSMS. I got the error message
"Login failed for user '/'. Reason: Server is in single user mode. Only one administrator can connect at this time.."
I found this blog and added the application name after the m switch http://sqlserver-help.com/2013/12/06/help-how-to-fix-error-reason-server-is-in-single-user-mode-only-one-administrator-can-connect-at-this-time/. But no dice, I still get the above error. The User Account looks fine I guess, I am an Administrator.
Also, I had to start the cmd prompt as an Admin to start sqlserver in single user mode. OR else I couldnt have access to the log files that the instance was using and it was giving me an error to that. So I ran the cmd prompt as admin. But still, I am the same admin trying to run SQLCMD or SSMS. It shoudlnt be telling me there is already an admin logged in, because I am that admin. What am I missing?
This is on SQLExpress, I dunno if that matters
Thanks!
First login to the server: "sqlcmd –A –d master"
.
connect to the master database with the DAC because master is guaranteed to be available if the instance of the Database Engine is started.
Shut down the database server and restart it with minimal configuration:
sqlservr.exe -f -s <instancename>
If it works fine, then you have a problem with your startup configurations and you need to find out which is causing you the issues.

Resources