RStudio Connections Pane: PostgreSQL Unicode(x64) does not appear in the list anymore - postgresql

I'm using the Connections Pane in RStudio to connect to a PostgresSQL Database. A while ago, I started this post Link and finally managed to set it up.
After installing my System new (Win10, R3.5.0, RStudio1.1.453), I tried to retrace my steps to set it up again, but couldn't do so. After opening the Connections Pane the only existing sources I see are "Livy" and "Spark". Postgres and all other connections are missing.
What I tried so far is to install PostgresSQL on my Computer. I also installed the RPostgres, odbc and DBI Packages in the hope that the Postgres option would appear in the list agian, but to no end.
There is this Troubleshooting Post on RStudio, but it didnt help me so far.
Does anyone know how to solve this issue? Thanks :)

I found the answer! The odbc Driver was not installed when I installed PostgreSQL on my system. Here a couple of hints for others who might have the same problem:
Open RStudio and type in:
odbc::odbcListDrivers()
If postgres is not listed, you can, at least thats what I did, go tot the PostgresSQL page and download the newest Version and install it. If for whatever reason, the driver is not installed, open the
Application Stack Builder (it comes with the postgres installation)
navigate to the folder Database Drivers and select "psqlODBC 32 and/or 64". Install them. It will just do the trick!

Related

pgadmin4 : postgresql application server could not be contacted.

I have installed PostgreSQL 9.6.2 on my Windows 8.1. But the pgadmin4 is not able to contact the local server. I have tried several solutions suggested here in stackoverflow, tried to uninstall and reinstall PostgreSQL 9.6.2 , tried to modify the config.py, config_distro.py, and delete the files in Roaming folder,i tried standalone pgadmin4 installation, but no success.However, in my local machine i am able to access the server using psql.exe and log as as superuser (postgres user). Can you please suggest any possible solutions to starting/running pgadmin4 ? Thank you.
I found the same issue when upgrading to pgAdmin 4 (v1.6). On Windows I found that clearing out the content inside C:\Users\%USERNAME%\AppData\Roaming\pgAdmin\sessions folder fixed the issue for me. I believe it was attempting to use the sessions from the prior version and was failing. I know the question was marked as answered, but downgrading may not always be an option.
Note: AppData\Roaming\pgAdmin is a hidden folder.
Start pgAdmin 4 as administrator.
Do the following steps:
Right click pgAdmin 4 icon
Select "Run As Administrator"
I had the same issue on Windows 10, with a new installation of PostgreSQL 10.
I solved it by including the path C:\PostgreSQL\10\bin ({your path to postgresql}\bin) to system environment variables.
To access environment variables: Control Panel > System and security > System or right click on PC, then > Advance system settings > Environment variables > System variables > Path > Edit.
I've been dealing with this for awhile (frustrating). So much that I have instructions on my desktop consolidating all of these ideas. Here is my magic combination to the solution:
Delete from App Data C:\Users\%USERNAME%\AppData\Roaming\pgAdmin
Add to Path Variables C:\Program Files\PostgreSQL\9.6\bin (I actually added it to both user and system)
Right click and start as admin.
You don't have to do this every time but when it gets out of wack try these steps.
What finally worked was downgrading to pgadminIII-v.1.22:
It seems in most of the cases Postgres trying to use information from previous sessions to find/connect the server and failing. Clearing out the previous session info helped me, it is a combination of 2 already mentioned answers above:
Navigate to Postgres session's folder
C:\Users\YourUsernameOrAdmin\AppData\Roaming\pgAdmin\sessions
Delete all the data from this folder.
Start PgAdmin in administrator mode.
Cheers!
if you are using Mac OS X here is a fix:
Open terminal and run this command
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log restart
and for other OS just restart your Postgresql server, it will solve
Then start pgAdmin4, it will start as normal
Share or comment if saved someone
Deleting the contents of C:\Users\%USERNAME%\AppData\Roaming\pgAdmin directory worked for me!
I had same issue on windows. I had v1.6 installed as well as v2.0. Uninstalling v1.6 allowed me to login.
I had the same problem, but running it as an admin worked.
Have you recently installed a new version of pgAdmin ?
This issue (and the misleading message) is simply due to the fact that old versions of pgAdmin are unable to read the settings saved by a newer version of pgAdmin !
Make sure you're starting the right version of pgAdmin (your shortcuts are likely to point to the old version !) and/or uninstall the old version: the upgrade wizard doesn't do it for you !
Deleting contents of folder C:\Users\User_Name\AppData\Roaming\pgAdmin\sessions helped me, I was able to start and load the pgAdmin server
I had the same issue on the macosx and I renamed .pgadmin (in /users/costa) to .pgadminx and I was able to start pgAdmin4.
In Windows Just go to this path and clear it
,that works !!
C:\Users\%USERNAME%\AppData\Roaming\pgAdmin
I was able to solve the problem by changing the pgAdmin web interface port.
I believe this problem occurred on my computer because I have several other services consuming webs ports like qBittorrent, IDEJetbrains, etc.
Right-clicking on the pgAdmin logo near the clock is possible to configure it.
I Fixed it in windows 10 just running pgAdmin 4 as Run as Administrator .
If you use older postgresql version like 9.x and its services is running,PgAdmin 4 confused which server is base database.
So stop the service older version or new one.Run PgAdmin 4 as Administrator
Its worked for me
This is often a firewall problem. The firewall log then shows dropped packets between 127.0.0.1: and 127.0.0.1:, where the latter is the port shown in the Browser to get no connection with. This means, that the connection between pgAdmin client (high_port_1) and pgAdmin server (high_port_2) is blocked. Check your firewall log and if you find dropped packets like described, adapt your firewall settings accordingly.
If none of the methods help try checking your system and user environments PATH and PYTHONPATH variables.
I was getting this error due to my PATH variable was pointing to different Python installation (which comes from ArcGIS Desktop).
After removing path to my Python installation from PATH variable and completely removing PYTHONPATH variable, I got it working!
Keep in mind that python command will not be available from command line if you remove it from PATH.
I use the cmd prompt on Windows 10 with psql postgres postgres.
Then I launch pgAdmin4 and it works.
I had this problem with pgadmin4 v2.1 on linux fedora 27
Solved by installing a missing dependency:
python3-flask-babelex
Just click on that pgadmin 4 icon and run as administrator. Allow the access permissions. It will start locally.
I need to add this here because I've had several issues with this message. If you have recently upgraded to High Sierra you will find the latest (pgadmin 4.20) will keep appearing with the message "Application Server Could Not be Contacted". What this actually means on Macs is that python was unable to configure your environment in ~/.pgadmin
This directory stores all the things you setup and configure and even logs of what was ran on your user copy usage of pgadmin.
The way to fix this issue on High Sierra is down to sqlite3. If you look in that directory you'll see everything is stored in sqlite3 files.
When version 4.20 of pgadmin was released it was shipped with a version later than sqlite3.19 and the problem arises because High Sierra is shipped with sqlite3.19, so to fix this issue, you need to replace the old version of sqlite3 with the latest on your packager.
Now be aware, MacosX+ all use sqlite to store details for the majority of apps on your mac, so you'll need to make sure you do not just wipe the old version but you'll have to have both versions co-existing together in harmony to avoid anything major occurring on your mac.
1) download brew https://brew.sh/
2) update brew and upgrade brew to make sure it's up-to-date
3) brew install sqlite3
4) mv /usr/bin/sqlite3 /usr/bin/sqlite3.os
5) ln -s /usr/local/Cellar/sqlite/3.21.0/bin/sqlite3 /usr/bin/sqlite3
6) /usr/bin/sqlite3 -version (check version is later than 3.19)
You can now proceed to open up pgadmin as normal
Got this issue after I upgraded PostgreSQL 9.4 to 9.6. The 9.4 binary package had PgAdmin 3 while 9.6 came with PgAdmin 4. I resolved it after a clean installation (I completely uninstalled and reinstalled) of PostgreSQL.
However, under different circumstances, you could try running the pgAdmin 4 application as an Administrator. This should fix the error.
downloaded pgadmin 4 v2.0 and install it no problem atm on force installation. try it. that was solution for me.
For my case in Windows 10 for postgresql 10 version, it worked by changing SERVER_MODE to False in config_distro.py placed in web folder, as per these configuration settings: https://www.pgadmin.org/docs/pgadmin4/dev/desktop_deployment.html.
There are other settings mentioned in this answer (https://superuser.com/a/1131964) regarding python but I just changed SERVER_MODE and it worked.
Kill it in Windows Task Manager and then try again. It seems that there is some sort of a problem when accessing the server from different applications.
As for me on windows 2012r2 it's start to work only after I reinstall pgAdmin 4 to folder c:\pgAdmin4. With out spaces and any special chars.
And all so I give full permission to this folder in NTFS.
It worked for me after installing python2.7 for pgAdmin 4 v2
Happens mostly when you have multiple versions of pgadmin installed or while trying to upgrade. Even I tried everything from killing the "running PID on port 5432" to "changing the server mode". In my case I uninstall postgres and re-install it again on different port(5433).
Later, I opened it through cmd(right click on cmd and select "run cmd as an Administrator").

PostgreSQL reinstall : Failed to load sql modules into the database cluster

I tried to re-install postgresql 9.5.3-1 on my windows 7 without success. In fact, at each attempt, I have the message:
failed to load sql modules into the database cluster
then, I get the message:
Error running post install step. Installation may not complete correctly. Error reading C:/Program Files/PostgreSQL/9.5/data/postgresql.conf
I tried several attempts to solve this issue
change the installation folder
switch to 32-bit
reboot
clean the register before reinstalling
install as a postgres user as describe here (Failed to load sql modules into the database cluster during PostgreSQL Installation)
PS: installation language is French
I finally found a solution to my problem. I just installed postgres as a super administrator
Had same problem. Just double check permission for your data folder. I set full control to authenticated users and it installs correctly.
Same problem here.
In my case it was a backslash \ at the end of the password.
See also https://stackoverflow.com/a/32146553/2443630

EasyPHP: transferring my data to a new install with files only (no database dumps)

I reinstalled Windows (I had v8.1, now v10) but forgot to save my databases as dump files. I do have my old EasyPHP folder with everything in it though. So I installed a new EasyPHP but now I don't know how to transfer my databases from the old EasyPHP install to the new one.
I tried to copy the content of my old binaries/mysql/data/ to the new one, to no avail (database connection errors).
Old EasyPHP: EasyPHP DevServer 14.1 VC11
New EasyPHP: EasyPHP DevServer 14.1 VC9
Seems like some people have faced the same problem too. This is my solution:
I simply ignored the regular, proper install process. I just launched the main executable (EasyPHP-DevServer-14.1VC11.exe), got a message asking me to update configuration file (sorry I don't remember what exactly), I clicked yes, and now I obtain the exact same state as before. No need to go through any install process.
I'll update this answer if I come across any unexpected problem down the line but it seems to work pretty well so far.

Error in Odoo8 installation- "column ir_ui_view.active does not exist"

I was running Openerp 7 earlier, then updated the code to Odoo8 RC1 on my Ubuntu 13.04, with Postgre Sql 1.16.1 database and Eclipse 3.8 IDE. Now I wanted to update to Odoo8.0 , when I downloaded the code from GitHub and tried to run the server from eclipse, I got this error:
"column ir_ui_view.active does not exist"
I understand here that Odoo8 has added another column to the ir_ui_view table, but how should I fix it on my side to get my server running. I dont want to go through the entire process to setup Postgresql, creating user, assigning roles and then installing odoo. Can I have a simple solution where I can edit the server file or change any database property to get this running. I went through few links but none could help much.
Thanks.
OpenERP/Odoo databases are incompatible between major versions.
They must first be upgraded.
This can be done by OpenERP support services or by yourself using tools such as OpenUpgrade.
try sudo apt-get install python-pass

MySQL Workbench Closes Unexpectedly

I'm using CentOS 6.4, and did
sudo yum install mysql-workbench-community.x86_64
That installed MySQL workbench version 6.1
When I launch the application it lists MySQL Connections, and has a box for Local instance 3306.
When I double click that box the app just closes. WTH?
edit: it's printing this on the console
/usr/libexec/mysql-workbench/mysql-workbench-bin: symbol lookup error: /usr/lib64/mysql-workbench/libwbscintilla.so: undefined symbol: gtk_widget_get_realized
If you've got the same issue like me with Workbench unexpectedly crashing it's easy to resolve:
Edit -> Preferences -> tab "general" and check "Force use of software based rendering for EER diagrams"
At least it's worth a try!
I too was experiencing same problem (on CentOS 6.4). I followed what they concluded on this bug report file. I installed the Workbench 6.0.9 release and the problem is gone.
If you've got the same issue like me with Workbench unexpectedly crashing while opening previous session with tables then just clean up sql_workspaces folder with their sub-directories:
rm -rf ~/.mysql/workbench/sql_workspaces/*
Unfortunately I have the repetition of this event every time so I created the alias in my ~/.bashrc (pro-)file:
alias fix_workbench='rm -rf /home/user/.mysql/workbench/sql_workspaces/*'
P.S.: My MySQL Workbench's version is: 8.0.12. The debug log is too long, including Register/Memory dumps and Backtrace.
As plan B you can also use dbeaver. It works on all OS.
https://dbeaver.io/download/
You better read what platforms are supported by MySQL Workbench: http://www.mysql.com/support/supportedplatforms/workbench.html. The Linux world is so shattered, it's very difficult to support all flavours. And of course always my own is certainly one that should be amongst the supported platforms...
Had same issue CentOS 6.4 :
/usr/libexec/mysql-workbench/mysql-workbench-bin: symbol lookup error: /usr/lib64/mysql-workbench/libwbscintilla.so: undefined symbol: gtk_widget_get_realized
Installed gtk2 devel libraries.
yum install gtk2-devel
Problem solved.
Thanks
Prasad
Centos6.8, Mysql80, Mysqlworkbench8.0.17
I have encountered same problem。 tried to install other version, but not worked; tried to install gtk2, not worked as well. Finally, I thought maybe the version was not correspond, so I install gtk3, it's worked.
What worked for me were very simple steps:
Downloaded a previous version of MySQL Workbench just in case
If it still shuts down when opening the app then verify that there is no app using mysql (for example a website you are building or whatever project you are working on) Stop them all
Do not open the workbench and stop the mysql server in the command line:
sudo service mysql stop
Now with mysql stopped open MySQL Workbench and open any connection
Once inside, MySQL should obviously not be running so now:
sudo service mysql start
Voila!