How can I confirm that Postgres had been installed properly for Heroku use? - postgresql

I am using Heroku and thus the Postgres is needed to be properly installed.
I used the Windows Installer "postgresql-10.1-3-windows-x64.exe" for my installation, and there was not special interruption during the installation.
However, after I deployed a Heroku app on web, and try to run ">pipenv --three" in my cmd windows, there's a message of ' "command" is not recognized as an internal or external command, operable program or batch file.', which make me not sure whether Postgres is properly installed.
I also tried to run the command "heroku pg:psql", and the result is as below:-
heroku pg:psql
Is that really because the Postgres is not properly installed, and how can I get it fixed? Thank you in advance for the help!
Environment:-
Windows 10 Home - 64-bit
Postgre Installer: postgresql-10.1-3-windows-x64.exe
Heroku: heroku-cli/6.15.18-fd2097 (win32-x64) node-v9.3.0

I finally got it solved, by adding the following into the $PATH.
%APPDATA%\Python\Python36\Scripts
It's not the matter of the installation.
Thx.

Related

`heroku pg:psql` doesnt work but psql works

Note: I'm on windows.
After installing postgreSQL in my computer trying to use heroku pg:psql gives me this error:
--> Connecting to postgresql-defined-56809
! The local psql command could not be located. For help installing psql, see
! https://devcenter.heroku.com/articles/heroku-postgresql#local-setup
The psql command works and psql --version returns the same version that my database uses on heroku as returned by heroku pg:info.
I have followed the instructions in that link and it still doesn't work (well I did that from the beginning). I even restarted my computer but it still doesn't work.
Edit: found that psql runs in powershell but not in cmd
Okay so after trying to set up the PATH from cmd I think I messed something up and the heroku command didnt work anymore and I reinstalled heroku and now everything works fine. What a waste of time.

Unable to install pgagent with application stack builder

I'm trying to install pgagent in a windows environment. Postgresql version 9.6 is installed and application stack builder was installed with it. I have followed the steps, detailed here.
The first step in this guide is to create the extension in the maintenance db, and I am not able to do that.
"ERROR: could not open extension control file "C:/Program Files/PostgreSQL/9.6/share/extension/pgagent.control": No such file or directory
SQL state: 58P01"
Tryied to skip this step and go straight to the installation with application stack builder, but the pgAgent tool does not show up.
I also tried to install it as a service using the command line instead of stack builder.
pgAent.exe INSTALL pgAgent -u postgres -p secret hostaddr=127.0.0.1 dbname=postgres user=postgres
This worked to some degree. The only error I get is this.
"Windows could not start pgAgent service on the local computer. Error 1069: The service did not start due to a logon failure."
But I have tried all possible combinations of usernames, passwords, secrets, ports and so on....
Any help would be much appreciated.
I had the same problem. I was able to get pgagent working by downloading and executing the stand-alone installation file pgagent-3.4.0-4-windows.exe from here: http://sbp.enterprisedb.com/getfile.jsp?fileid=11842
I wound up installing the Stack Builder Plus from EDB. Unfortunately, you have to create an account, but it has a lot more options for which pgAgent version you want. Note: You can use Stack Builder for only pulling a pgAgent installation executable and run that on your target servers.
this worked for me :
first I accessed the postgres bin file using cmd: C:\Program Files\PostgreSQL\11\bin
then i tapped this :
pgAgent INSTALL pgAgent -u windowsUser-p windowspassword hostaddr=127.0.0.1 dbaname=postgres user=postgres password=***
Have you choosen a localy installed database before this step ?
You will need to have installed PostgresSql, CLI Commands and Stackbuilder to have the option of installing pgAgent via those eDB installers.

Error when opening pgAdmin 4 on mac

I have installed version 4-1.5, but when opening it, it always shows this error "The application server could not be contacted."
I removed the local directory hidden and resolved:
$ cd ~
$ rm -r .pgadmin/
Note: macOS Sierra (10.12.6) and pgAdmin 4-1.6. Also you are going to loose configuration data like database list tree, et al.
The Databases will remain intact since you are modifying/deleting PgAdmin related data not any of Postgresql itself.
I had the same issue, I fixed it by stopping the service in Postgres app, then start pgAdmin, and then start the Postgres service. I was able to connect it after that. Hope this help.
I had same error, but in my case I use wrong port number for the database
On my system Safari is the problem as it was default browser.
To fix, make Chrome your default browser and try relaunching pgadmin4
OR
Manually fix by
$ cat ~/.pgAdmin4.5704814747986328352.addr
http://127.0.0.1:62631/?key=0ec25e6a-dfe2-483e-9814-b315ea87c3cf
Paste what you get in Chrome

ssh not working for Amazon EC2 server

I have setup and launched an instance of Amazon EC2 server with Ubuntu in it. Now I have integrated cygwin with command prompt also so all linux commands are working in command prompt.
I tried to access the server using ssh -i munish.pem ubuntu#52.11.190.155 (munish.pem contains my secret key).
After running this command I get an error: 'ssh' is not recognized as an internal or external command, operable program or batch file. I searched net and could find solution for github not for Amazon EC2 service...
You can use putty software in window for connecting to the AWS EC2 instance.
Follow the below steps:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html
Hope it helps..
You can open PowerShell and check ssh command is available or not.
If not, you can install OpenSSH in Windows 10. See following guide on how to install it.
https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse

mysql daemon install as a service on windows

I just downloaded mysql 64 bit as a zip package from their website, extract it to c:\mysql
and added c:\mysql\bin to my path.
I then open a command prompt as administrator and run:
mysqld -install
To install the mysql server as a service. I then go to windows services and start MySQL (also tried sc start MySQL from cmd), but I get the following error message:
Upon inspecting the properties of the service, it shows the path as C:\Program Files\MySQL-5.6.17\bin\ instead of C:\mysql\bin. Any ideas why this is happening?
Use the FULL PATH of your mysql server exe
Try this:
"C:\mysql\bin\mysqld" -install
It turns out that the service installation routine expects the .exe to be at the MySQL default installation directory of C:\Program Files\MySQL-5.6.17\bin\
Your installation with the straightforward mysqld -install could work, albeit only partially, because you had the correct path under Windows PATH
This is certainly a great inadequacy in the MySQL documentation, which does not address this issue at all.
Knowing you might have resolved your problem one way or another, I still thought to post this here as it might be of help to someone with time!
Cheers.