Postgres not available as adapter on Induction - osx-mountain-lion

I'm using Postgres.app and the latest build of Induction ( Version 0.1.0 (28) ) and I cannot choose "Postgres" as an adapter. I only have the options for mongodb, redis, and sqlite. If I attempt to type it in manually (i.e. "postgres://locahost"), it automatically reverts back to "(null)" instead, once I click another form input.
Is there somewhere I need to specify that I'm using Postgres locally (specifically with the PATH being set to the Postgres.app location in Applications)?
I'm using Mac OS X 10.8.2, Postgres 9.1.4, Postgres.app 1.0 (11), and Induction 0.1.0 (28).

I have Induction working against PostgreSQL 9.3 as installed by Homebrew.
It sees that if you don't have a database set up then postgres does not appear in the adapter list, but when I came back to it after setting up PostgreSQL, creating a database and a user for it, then 'postgres' was available in the adapter.
Connecting it was as follows (one way, anyway)
Set the adapter as postgres, but instead of filling in the fields, click on the top field and enter the string:
postgres://user_name:user_pass#127.0.0.1/database_name
The 127.0.0.1 means you'll be connection over tcp/ip and will need (eg if running Rails) host: localhost in your database.yaml file under development

Related

Psql gives "SSLv3 alert handshake error" when trying to connect to Postgresql database

Using Windows 10 cmd.exe
I was using psql 7.4.6 which looks like the most recent version, but it no longer works. https://sourceforge.net/projects/psql/
I'm still waiting on IT to tell me which version of Posgresql we have. I cannot do it myself. I normally use psql to do that but psql no longer works.
I'm trying to use psql to get the current date from a Postgresql server but I get this error: "SSL Error: SSLv3 alert handshake error"
We have upgraded Postgresql at least once since psql has worked with it. Could it be psql (which hasn't been updated since 2013) no longer works without our newer Postgresql?
Is there a free Windows front end I could use to browse raw data in our Postgresql DB?
I only need read access to the DB, I do not need write access. I will not have admin access to it. The DB sites on a black box from a vendor so we cannot configure Postgresql.
The software should not require me to install any other packages like Apache, PHP, Java, etc.
Thank you!

ORA-12541 TNS :no listener on 1 specific remote database, but not on others

Some context: I'm setting up an environment to run some Ruby code our Lead wrote to connect to some remote Databases. I'm using Win10 and have WSL installed. I have installed SQL*Plus, docker, and Ruby, and am sure I have installed all the dependent gems (actually at this point I know for a fact its not a ruby problem). I'm using Docker to use a pre-built image of an Oracle Database, and I have populated it with data.
Obfuscated company DB information:
'Broken' DB (TNS no listener)
Username: W-WORK-DEV
Password: password
Host: host1
Port: 999
SID: W-WORK-DB.tech.company
'Working' DB (can connect just fine)
Username: C-OLD-DEV
Password: password
Host: host2
Port: 999
SID: C-OLD-DB.tech.company
Please note the names I have provided here are purely for obfuscation, they do not represent anything about age or even config. They are essentially the same, just different databases on different hosts. Also note this is a corporate company and would have a lot of base infrastructure for their internal network.
The issue I am having is that with the specific database I am working on, I cannot connect to it. I connect to the company intranet via a VPN (I work offsite) and have issues connecting to WORK-DB.tech.company, though I can connect to C-OLD-DB.tech.company. Methods I have tried to connect with:
Oracle SQL Developer
I have inputted all the correct jdbc strings and username / password. Have even asked other people to attempt to connect (at least 3 others). They can all access C-OLD-DB as well as W-WORK-DB. When using this method, I get The network adapter could not establish the connection.
Side note: I'm fairly sure I have connected to the DB just fine in the past, though I can't be certain because I'm fairly new to this team and have only accessed it once, if that.
SQL*Plus via WSL
I installed SQL*Plus because I think Ruby was accessing it in some capacity when running the script. I got to the point where the script was able to connect to my local docker Database, but when it tried to connect to the remote database, it would return TNS: no listener. I attempted this using sqlplus as well and got the same error.
Example:
sqlplus C-OLD-DEV/password#host2:999/C-OLD-DB.tech.company
This command works and connected to the DB jsut fine.
sqlplus W-WORK-DEV/password#host1:999/W-WORK-DB.tech.company
This command gave me TNS: no listener.
During my research I had found mentions about tnsnames.ora, sqlnet.ora, and listener.ora. I have found relevant files around the company intranet and attempted to use them in my own personal environment to no avail (one of the sqlnet.ora files actually stopped me from being able to connect to any) I found mention about a config/database.yml file related to ruby, but our code already has the database information set up and I seem to be getting to the same solution as the script when trying to manually connect via sqlplus.
Here are some relevant environment variables I have set up when doing these installs. I'm thinking that at some point when trying to set up my environment, I messed up some config that changed the way sqldeveloper or sql plus would connect to that database.
$ echo $ORACLE_HOME: /usr/lib/oracle/12.2/client64/
$ echo $TNS_ADMIN: /usr/lib/oracle/12.2/client64/network/admin
$ echo $LD_LIBRARY_PATH: /usr/lib/oracle/12.2/client64/lib
I hope I have provided all the information I have come across and have explained clearly what my issue is, if you have any questions feel free to comment about it so I can clear it up. Thank you for any and all your help.
So my problem ended up being a 'firewall/port' issue. In the end i found out that specific port I was connecting to was blocked, but I thought it was only on my system. Turns out the VPN I'm using was the issue blocking that port. Company has a Primary Data Center and a Secondary one, and apparently the SDC VPN was blocking that port from me. I switched to using the PDC VPN and it worked.
Are you using the 64 bit jdbc drivers?

Install Magento 2.1 with MariaDB

Current system installed is using MySQL, going forward we decided to move from MySQL to MariaDB. MySQL service has been stopped and created new DB using HeidiSQL which comes after MariaDB installation.
Now while installing Magento 2.1, I am facing below error.
How do I install Magento 2.1 with MariaDB ? Currently I am using WAMPP server.
try using localhost as the hostname in the configuration
also, try creating a new user for your database with host %
You probably need to set-up your firewall settings and open up ports for MariaDB (SQL during installation does that for you, so you didn't have to do it manually). Also add another user with privileges you need, it's never smart to use root for all of your access.
You can follow some steps on this link, for configuring remote access. It should be the same for the local configuration, at least the same ports.

PostgreSQL cannot connect: service definition not found

In Windows 10 Pro 64-bit & new installation of PostgreSQL 9.4, attempting to connect to the server in pgAdmin III results in
The service is running and the service name is correct, as seen here
I am brand new to PostgreSQL, but fwiw, I've configured a working Symfony 2.7 application to use PostgreSQL and have successfully (according to the Symfony console) created a database and its schema.
What is required to get pgAdmin to connect properly?
It turns out that the error message is grossly misleading. There is no issue with the service definition. Instead, I learned that when logged in as a user other than the user that created the PostgreSQL installation (e.g., postgres) one needs to do this at the command prompt:
runas /user:postgres "C:\Program Files\PostgreSQL\9.4\bin\pgAdmin3.exe"
There may be a more elegant solution than making the above a cmd file. I'd like to know what that is!

How to connect to Postgres database through Ruby's pg gem (outside of Rails)

I've been using Postgres without issue within Rails and have also been running psql without issue. However, I'm running into a problem trying to connect to the database with the pg gem.
The following code:
PG.connect
generates the error/output:
PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
The result is the same whether I specify various dbname: values or not or just let this default.
When I click on the little elephant icon at the top of my screen, it says "Running on port 5432" and, as I said, I can connect with psql without a problem.
I found the very similar cannot connect to Postgres (pg) database from my Ruby Script using gem "pg"(This is not rails, just pure ruby), but the answer simply said Rails works fine.
Any guidance would be appreciated. (Note: I realize I haven't entered any name/password info, but I don't have to enter than when I run psql and I gather it's not getting to the point of authentication).
You need to specify a host. It's trying to connect on a unix domain socket. The PG app doesn't listen on a unix socket (unless you configure it to) but runs on localhost:5432.
conn = PG.connect( host: 'localhost' )
It is quite likely that the actual problem is that your 'pg' gem has linked to an older version of a libpq dynamic library. See this post for more details and a possible solution.

Resources