MySQL | Insert multiple records and update if record(s) already exist in a single query

| By Webner

In MySQL, we generally perform insert, update, select and delete operations on records of table. Multiple Insert operation can also be easily performed on table. Take an example of Employees table with fields: Multiple records can be inserted in Employees

MySQL | Upgrade MySQL 5.5 to 5.6 in Ubuntu 14.04

| By Webner

MySql 5.5 is the default version for Ubuntu 14.04 Steps to Upgrade the mysql-server If you have existing database in Mysql 5.5. It should be migrated automatically. Take the backup of existing databases: mysql> mysqldump –lock-all-tables -u root -p -all-databases

How to use SimpleSAMLPhp as a Service Provider for authenticating users?

| By Webner

How to use SimpleSAMLPhp as a Service Provider for authenticating users? Some Basic steps to start using simplesamlphp. 1. Download stable version of SimpleSAMLphp from this link: Click here 2. Go to the directory or your workspace where you want

Ubuntu 14.04 | Installing postgresql 9.4

| By Webner

Follow steps below to install Postgresql 9.4 (instead of 9.3 for which sources are added by default in Ubuntu 14.04): 1.  Remove the previous PostgreSQL Version: *Make sure that you firstly backup your databases. $ sudo apt-get –purge remove postgresql-* 2.  Add

java.sql.SQLException: Data truncated for column date at row 1

| By Webner

You may face this exception while trying to insert data in a mysql table using hibernate: java.sql.SQLException: Data truncated for column date at row 1 While there can be different reasons of this problem, in our case it was occurring