23 Mar

MySQL:The user specified as a definer does not exist (error 1449)-Solutions

The self-explanatory error that led this post is:
MySQL error 1449: The user specified as a definer does not exist.
I wrote about DEFINER & INVOKER SQL SECURITY in MySQL long back in early 2012 which covers the explanation of how they work WRT stored routines in MySQL!

Here I’ll try to extend it little more with examples for the error and provide 3 solutions.
Continue Reading…

10 Mar

10 useful shell script code snippets | Linux

This post is collection of 10 useful unix / linux shell script code snippets I’ve often used.

Following these code snippet you will be able to answer following questions:
1. How to calculate script run-time in shell.
2. How to parse parameters / arguments to shell script.
3. How to safely change a directory in shell script.
4. How to check if a command was successful in shell script.
5. How to add timestamps in script log output.
6. How to check if a process is running.
7. How to colour your script output.
8. How to read variables from config file.
9. How to loop over files in a folder.
10. How to perform actions based on variable value using SWITCH…CASE

And a bonus snippet
11: How to send emails from shell script.

Let’s begin.
Continue Reading…

-- Kedar Vaijanapurkar --