pgadmin db restriction server property not working - postgresql

I have a heroku postgres database. On pgadmin i can see over 1,700 databases since they are all on the same host. I have set the server connection settings as provided by heroku and i can see my database highlighted in yellow and can access it normally.
I tried disconnecting from the server than edit the db restriction property in the advanced tab and put in my database name(same one as the maintenance db, and without ''). I press save, i reconnect to the server but i can still see all the databases of the server and all the live data of the entire server. Am i missing something?

Don´t download the latest version of pgadmin 4(v.6.10), instead download the v.6.9
link:
https://www.postgresql.org/ftp/pgadmin/pgadmin4/v6.9/windows/
I believe that latest version is buged when we try to especify a dbname for restriction
uninstall 4(v.6.10) and replace (v.6.9)
i faced the same problem here, but installed (v.6.9) and worked great, and brings me only my database
for pgadmin4 you dont need single quotes ... just write the dbname and then tab
How to hide databases that I am not allowed to access
result-image

Related

postgresql pg library taking windows username instead of postgresql

i am using pg lib in strapi application, where initially it creates postgres connection using correct postgresql username(postgres), database name(strapi_db) and password(postgres) but after login it changed it to connect using my windows 10 username(rayappan.a, and database as rayappan.a). it seems strange to me because i never configured anywhere to use my windows credentials for POSTGRESQL connection. please any one tell me how to fix username connection issue
Regards,
Rayappan Antoniraj
Take a look into https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING . It states that username:
Defaults to be the same as the operating system name of the user running the application."
The database name:
Defaults to be the same as the user name.
So it seems a new connection with parameters not set is made.

Database backup not working using database manager

I'd like to backup a db today through localhost:8069/web/database/manager
, but the button return nothing while clicking the button.
Terminal show no error there.
Also invalid for duplicate, delete, create database,restore database and set Master password except link of existed db.
see pic as below:
the problem emerged since I deployed odoo12.
I can directly backup through pgAdmin4.
but I still want to know what happened.
My version of pgsql is 9.6 for odoo10 and odoo11.
It worked smoothly before I deployed odoo12
I found it's a stupid question.
the reason is that I connect to wrong db_host:
my conf set db_host as 127.0.0.1 but connect to localhost.
keep this topic for who make same mistake

How do I view a PostgreSQL database on heroku with a GUI?

I have a rails app on heroku that is using a Postgre database. My database has > 40 tables and > 10,000 rows. I would like to delete a lot of data, but it would be much easier if I was able to view and interact with it in a GUI table. I can access my data in rails console, but it's taking too long.
pgweb is a great cross-platform GUI, and it's easy to connect to your Heroku Postgres when launching from the command line.
I installed via Homebrew on a Mac (brew install pgweb), but instructions for other platforms are listed on the site. Here's how I launch pgweb connected to a Heroku Postgres DB:
heroku config:get DATABASE_URL | xargs pgweb --url
And if you want to connect to your localhost:
pgweb --host localhost
I'm a little late here, but this may help someone else who stumbles across this thread...
If you go to your Heroku app's dashboard (through the website) > settings > "Reveal Config Vars" > DATABASE_URL, and paste that URL into the browser.
I use TablePlus for database management, when I paste the link into the browser it asks if it can open TablePlus and then I can edit my production database in real time just like I would in development.
I'm not sure what pasting the URL into the browser will do if you don't have TablePlus. I assume it will request to open any other SQL management app you might have.
As slumdog wrote in the comment to your question, you can use pgAdmin, which comes with your local Postgres installation.
This article explains how to connect your remote heroku db with pgAdmin, using heroku credentials: https://medium.com/#vapurrmaid/getting-started-with-heroku-postgres-and-pgadmin-run-on-part-2-90d9499ed8fb
From the article:
"pgAdmin is a GUI for postgresql databases that can be used to access and modify databases that not only exist locally, but also remotely. For a fresh install of pgAdmin, the dashboard likely contains only one server. This is your local server...
We have to configure a new remote server with its credentials.
right click server(s) > create > server …
Fill out the following:
Name: This is solely for you. Name it whatever you want, I chose ‘Heroku-Run — On’
Under the connection tab: hostname/address. If you go back to your datastores ‘reveal credentials’, this is the host credential. It should look like --**...amazonaws.com
Keep the port at 5432, unless your credentials list otherwise
Maintenance database — this is the database field in the credentials
Username — this is the user field in the credentials
Password — the password field in the credentials. I highly advise checking save password so that you don’t have to copypasta this every time you want to connect.
In the SSL tab, mark SSL mode as require
At this point, if we were to hit ‘save’ (please don’t), something very strange would happen. You’d see hundreds if not thousands of databases appear in pgAdmin. This has to do with how Heroku configures their servers. You’ll still only have access to your specific database, not those of others. In order to avoid parsing so many databases, we have to white list only those databases we care about.
go to the Advanced tab and under db restriction copy the database name (it’s the same value as the Maintenance database field filled earlier)."
Article contains other usefull guidelines and screenshots.
Try GUI of DBWeaver.
https://dbeaver.io/
Download it, after that you can connect your heroku postgres using Database Credentials data.
You can use Heroku's hosted DB viewer on the Overview pane of your dashboard:
Create and click the Dataclip:
Dataclip GUI is fairly easy to use, we can type and customize SQL queries at the top etc.

Connection to CloudBees database using MySQL Workbench

I've just uploaded my locally developed app to CloudBees. It works fine: I can load the web pages and it can access the database.
However, I cannot connect to its database (also provided by CloudBees) using MySQL Workbench or the command line tool. It always says
Can't connect to MySQL server on 'ec2-50-19-213-178.compute-1.amazonaws.com' (10060)
Any CloudBees configuration that I might be missing?
double check your database connection parameters using SDK : bees db:info -p <databasename>
you should be able to connect to DB using mysql workbench and other mysql tools.
In the MySQL forum exists a collection of links for various types of connections using MySQL Workbench. One is probably especially interesting for you as it deals with Amazon RDS databases. Among others it shows what connection parameters are needed.
Seems that there were some firewall problems in the corporate router that prevented me from connecting before. I tried at home and it worked.

Connecting to a Heroku PostgreSQL database

Hi i'm totally new to Rails and Postgres + Heroku. I've developed a web and just like PHP you can see what are the records user has entered and key in with phpMyAdmin however what about Rails? How can I see the records?
I've uploaded the app to Heroku so now I wanna see my Production's data. What is more is that my test and development data can't be seen in PGAdmin as well.
You can connect to Heroku Postgres just as you can a local database.
Go to https://postgres.heroku.com/databases, select the database, and it will display the connection settings. On the far right of the page there is an icon with two arrows on it, and selecting it will give you the connection string for various technologies, including a psql command line you can just copy and paste to a terminal.
It will look something like:
psql "dbname=ddgadagin host=ec2-107-12-168-211.compute-1.amazonaws.com user=dgddgargarg password=huu55ihfwqreergr port=5432 sslmode=require"