Client Connections wont load Unhandled exception:DbMySQLQuery - mysql-workbench

Mysql Workbench Client Connection would not load?

Fixed it by enabling performance_schema and installing sys DB.

Related

Troubleshoot org.postgresql.util.PSQLException: Connection attempt timed out that only occasionally happens

I have several applications running on tomcat with a local PostgresSQL database. And tomcat occasionally reports the following errors:
org.postgresql.util.PSQLException: Connection attempt timed out.
I am able to connect to the database using other tools such as DBeaver. And this problem looks only happens when several applications are connecting to the database. So I want to know how to troubleshoot this issue. Is there any log in PostgresSQL that I can check?
PostgreSQL does have logging. It is very configurable, and we can't tell you how you have it configured. Common locations are /var/log/postgresql/, and in PGDATA/log/. However, a connection timeout will probably not be in the postgresql log as it probably never achieved contact with the postgresql server to start with.

connection verification failed for data source - Coldfusion Server Administration

I have just installed ColdFusion 10 and am trying to connect to MySql Server 5.1, but it is showing the error below:
Connection verification failed for data source: cfartgallery2
java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer
JDBC Driver]Error establishing socket. Unknown host: MySQL Server The
root cause was that: java.sql.SQLNonTransientConnectionException:
[Macromedia][SQLServer JDBC Driver]Error establishing socket. Unknown
host: MySQL Server
Finally after 2 days I solved my own problem of getting the above error. It was due to a missing ODBC connector.
Steps for resolving:
First download and install the ODBC connector of respective version as of your MYSQL server version.
Rhen install vcredist_x64 it is required for sql connectivity.
Then install any SQL Server to create the database and start connecting to it with the datasource you have created in tour CF Administrator.
Hope you can solve your problem with my instructions , if not then please post your queries below.

Automatic reconnect to postgres with Grails after restarting postgres

Our web application is running on postgres 9.3 and Grails 2.5.3. When we restart postgres (/etc/init.d/postgresql restart) and access the website the exception "This connection has been closed." until we restart the grails app.
However, we would like the grails app to automatically reestablish a connection with the db, after we have restarted postgres. So we would like the app to automatically reconnect to the db by itself, without us having to restart the grails app.
Is that possible and if so how?
Check out this answer: https://stackoverflow.com/a/32437524/2166188 and add to config:
testOnBorrow=true
validationQuery=SELECT 1

OpenERP - connections to database

I am running OpenERP v6, Windows, PostgreSQL 9.1. When I connect to the database from my Windows OpenERP client, the OpenERP service makes a connection to database. This connection is visible in pgAdmin Server Status window. When I close OpenERP client, the connection is still there. Moreover, if I open OpenERP Client again, then login, the OpenERP service creates another connection to database, visible in Server Status window. Should there be only one connection to database made by OpenERP service for multiple OpenERP Clients? Can someone clarify to me the logic behind the OpenERP connectivity to database? Can this be a bug in the server code? If yes, can you direct to web site where the bug is fixed or to the file name where the relevant code is?
Thanks!
You can run multiple Openerp Server With PostgresSQL 9.1 with changing the port number
You can change the port number by following way:
./openerp-server --xmlrpc-port=8070 --db-filter=your_database_name
You can also manually kill the process which is running on current port number

c3p0 pool cannot establish a connection. How to debug this?

I have a Tomcat and PostgreSQL installed on a server. I'm having a connection problem trying to connect from my servlet to PostgreSQL database using c3p0 pool.
I can reach DB if I'm running Tomcat locally on my laptop. Also I can connect from server to DB using psql (i.e. command line sql utility). But when I'm trying to deploy my servlet to server and establish a connection I'm getting the following error:
java.sql.SQLException: Connections could not be acquired from the underlying database!
com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
...
com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
What should I check to locate a problem? It should be a trivial issue but may be due to 4 a.m. I'm missing something :) Thanks in advance!
PS: Connection from all network interfaces are allowed to database. PostgreSQL JDBC driver and c3p0 pool are distributed in WAR. Tomcat configuration is very default. JNDI is not used.
You need to check a few things:
java.policy which tomcat is using
(e.g.
/etc/tomcat5.5/policy.d/02debian.policy)
db server settings (e.g.
/etc/postgresql/pg_hba.conf)
try connecting without pool first as
in my case c3p0 was hiding important information from me
Adding to #Alexey's answer, I had this issue with Tomcat and PostgreSQL 9.4. In my case, the md5 authentication method in postgres was causing the issue.
If you are using Windows server or RHEL server, make sure you update the authentication method in pg_hba.conf file. Modify it to trust and restart postgresql.