Kurinchi Blogger Scribbles …

Posts Tagged ‘my.cnf’

Mar 17

How to fix Hibernate MySql connection timeout issue (solved)?

Last updated: June 14th, 2013

When we began creating an application using Struts2 framework with Hibernate and MySQL, we ran into a problem which was related to MySQL timing out its connection after a span of 8 hours when left unused. It conceived a lot of time at our end but we were able to nail down the issue at the end.

Steps that we had taken to correct the issue related to Hibernate MySql connection timeout problem are listed below

– Download Hibernate C3P0 and copy .jar files
– Set c3p0.properties
– Make changes to hibernate.cfg.xml
– Test MySQL connection timeout
– Hibernate, MySQL connection timeout related error messages

Jul 20

Linux: Case sensitive MySQL table names

Last updated: August 10th, 2011

When transitioning MySQL database from Windows to Linux, users often encounter issues related to case-sensitiveness. Windows is case-insensitive and Linux is case-sensitive.

In such scenarios when a database call is made after the application migration happens, users often run into errors which can send them in circles between the migration servers.

Solution to this problem is to add a single line of text under my.cnf (MySQL configuration file) under [mysqld] (more…)

Mar 26

MySQL: Default collation latin1_swedish_ci (swedish case insensitive)

Last updated: March 26th, 2011

When new fileds are created as variable characters they get stored as latin1_swedish_ci as default. To change the default collation users will have to manually select the collation of their choice from the mysql admin interface such as in the case of phpmyadmin or will have to denote it in sql queries.

To make a specific collation as the default, other option to give mysql an indication of it by having the needed collation name in my.cnf (mysql configuration) as shown below

Edit my.cnf:


Feb 05

MySQL: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’

Last updated: February 5th, 2010

Reason why this error might occur:

i) Incomplete MySQL implementation
ii) MySQL setting mis-configuration


root@myserver:/# vi /etc/mysql/my.cnf

Comment out the below line in my.cnf file to make MySQL listen on ALL interfaces
#bind-address =

root@myserver:/# netstat -tap | grep mysql
tcp 0 0 *:mysql *:* LISTEN 17785/mysqld

Note that above line which indicates MySQL listening on all interfaces.

Valid HTML 4.01 Strict  Valid HTML 4.01 Strict