MySQL Different command for Backup and Restore Databases

Backup Database Making backup all databases: mysqldump -u usuario -p –all-databases > dump.sql Making backup only one database: mysqldump -u usuario -p –databases db1 > dump.sql Making backup many databases: mysqldump -u usuario -p –databases db1 db2 db… > dump.sql Making backup using gzip compresson mysqldump -u usuario -p –all-databases | gzip > dump.sql.gz Making […]

PostgreSQL create a user account and grant permission for database

Here I mentioning the steps require to Create a Postgres User and give them access to particular Database Firstly run command  “sudo su” to make a user as a super user create a new User in unix or you can use the existing one as well, You can create a new user by command # […]

Ubuntu Boot hangs on “checking battery state”

Today Morning,  I was trying to upgrade Ubuntu 13.04 to 13.10 and suddenly power get fails and my system shutdown. and after that  my when I try to own the system . it  hangs at “Checking battery state” while booting. So after that following steps was done to solve the problem press ALT + F5 […]

How scrum team Rolls

In Many Places People ask me what are the work and Processes Followed in your company. and while describing them about Agile Methodologies we follow, they Always come with a series of Questions? What is Scrum? What is Sprint?… and all So here are is a short description on it How Scrum Team Works. In […]

Count the Users total commits from git

Here is the command to list all the users with their git commits $ git shortlog -s -n and output will be in following fromat commit_count   user_name

encoding::UndefinedConversionError: U+00C2 from UTF-8 to US-ASCII in Unbuntu Linux

This is an error due to the some locale language package inavailable in your linux system You can check the list of locale in your system by following command sudo locale -a Then You can re-generate the locale for your system using commande sudo locale-genand this will solve your Encoding issue 🙂

Get Sum of field from associated table in Rails/Mysql

Sometime you have relationship like  campaign has_many causes and need to calculate sum of raise_amount raised from each campaign from the associated table In mysql this can be done by a simple query select,SUM(raises.raise_amount) as total_sum FROM campaigns LEFT OUTER JOIN raises ON GROUP BY; In Rails it can be achieved by this […]