Thursday, December 17, 2009
The One
Tuesday, December 8, 2009
Weekend Buzz....
Tuesday, December 1, 2009
Mis(s)take...
Saturday, November 28, 2009
It's Awesome Times Awesome...Awesome Square...
Ever since I was a kid, I have been passionate towards English language. I still can’t figure out the instinct that ignited impetuosity towards English language in me, and which made me a logophile!! There are umpteen people, movies and friends I adore; for their profound way of speech/dialogues and for their (creators) commanding knowledge on English language.
Till the first week of Oct’09, this movie stood right on top of my favorites list because of this character’s dialogues. But (I wonder why there is a BUT for everything in life?) in the first week of Oct’09 I met “How I Met Your Mother” aka “HIMYM” and it reached the top of the chart because of this character’s dialogues.
It’s a sitcom aired by CBS. The plot is about the main character Ted Mosby; in the year 2030 recounts to his son and daughter the events that led to his meeting their mother (which explains the title), about his friends and the stuff they did in NY.I give two reasons why this TV series has reached the top of my favorites chart and why it has taken a place in my blog.
Being a logophile, I asked many people “what could be the most beautiful word in English?” Finally this show answered me. It’s AWESOME.
Saturday, November 14, 2009
Random thoughts about land contentions....
Saturday, October 31, 2009
Waving.....
I have been anticipating the Google Wave invitation from September 30th (ever since the day it’s launched). Finally I got the invitation from a twitter friend couple of days ago. I tried to encapsulate few features of Wave in this article.
Google Wave is a web application that lets you easily communicate and collaborate with others. By Google Wave we can use the web to have conversations, share photos and files, work with others on documents, chat in real time, organize our information, post to blogs and more. It features tagging waves, dockable labels, personalized folders, Map gadgets, Yes/No/Maybe gadgets, Doctor Wave and many more.
Trippy: is an itinerary, where we can create and scheduled our trips, dates and share them friends. A sample trip to New Delhi in February is given below.
P.S.: I will invite my friends to Wave, as soon as I get the credentials.
Tuesday, October 27, 2009
2 hours @hospital...
I came to the office this morning half-hour early and started my routine work. Few minutes later one of my colleagues (mentioned as struggler henceforth) came (apparently languish) and expressed that he was agonized by severe stomach-pain (@lower abdomen). I tried to console him, told him to lie down on the desk and take deep breaths. With a sweaty face he cried that the pain was unbearable and complained that he never experienced such hazardous pain in his life time. I googled about the "pain in stomach" and it showed the horrifying results related to appendicitis. I probed him about few symptoms of so called appendicitis, but his response was negative. Then I catechized whether he had suffered from problems related to kidney stones in the past. “Alien thing to me” was his response still holding the lower abdomen tight. I couldn’t see him suffer more, so went to security guard and took a “Cyclopam” pill as first-aid. He had the pill. After couple of minutes two more colleagues came, doubted the pain might be due to appendicitis carnage inside the stomach. And suggested a visit to Doctor will better the situation.
Within minutes, the struggler, a helper and I were in “G****j
At around 11:00AM our surgeon at door#3 arrived, checked his patient and suggested to get couple of pathology reports and the magical “Cyclopam” pill again incase of future stomach-ache.
Then we three returned to the office and the rest his history.
P.S. Mr.Chetan Bhagat was inspiration of the title.
Sunday, September 20, 2009
Experiments with My SQL....
Topics covered:
1) How to check My SQL server is up or not and how to start the server.
2) Various command to login to the My SQL server.
3) How to change/reset/recover the root/user passwords.
4) How to take the dump of a My SQL database to a file and how to import it from a file.
5) Executing queries from shell.
Start and Stop….
1) You can check whether My SQL server is up or not by simple unix command given below.
$ ps –ef|grep mysql
The command will show the mysql process running or not.
If the My SQL server is not running, it is very simple to start, execute the following commands in shell prompt.
a) $cd /etc/init.d
b) $./mysql start
The above commands make the My SQL server up.
To stop the My SQL server use
$etc/init.d/mysql stop
Logging in….
2) We can login to the server by any of the below given commands.
a) Without database argument:
In the above command –u signifies the option USER (in the command it is “root”) and –p signifies the option “database to be selected” (in the command we have not passed any argument). We will receive the prompt “Enter password:” give the corresponding password. Once we logged into the server it prompts “mysql>”, which is default, we can set the prompt to our desired one by the below command
mysql> prompt demo$
Prompt will be changed as shown below.
demo$
We can see what are the databases existing in the server by following query.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test1 |
+--------------------+
3 rows in set (0.00 sec)
Now we can select any database by the following query.
mysql> use [databse_name];
We will receive the prompt “Enter password:” give the corresponding password. Here in this command database to be selected is given at command prompt only.
c) Now we see the single line login to My SQL server:
$mysql --user=[user] --password=[password[ [databse]
$mysql --user=root --password=abc123 test1
Note: “double hyphens” (--) are required in mentioning the arguments, no spaces are allowed before and after “equal to” (=) symbol and the value passed after the password (abc123 in this example) is taken as database to selected, which is optional.
Passwords….
3) If we have not set the root password for My SQL, the server does not require a password at all to login. To set the password for the first time use the following command in shell prompt.
$mysqladmin –u root password NEWPASSWORD
If we want to change the password, use the command given below
$mysqladmin –u root –p ‘oldpassword’ password NEWPASSWORD
$mysqladmin –u USER1 –p ‘oldpassword’ password NEWPASSWORD
Or we can reset the password of any user using My SQL command prompt as shown below.
a) Login to the My SQL server
$mysql – u root –p
b) Select the databse
mysql> use mysql;
c) Change the password for user USER1
mysql> update user set password=PASSWORD(“NEWPASSWORD” )where user=’USER1’;
d) Reload the priviliges
mysql> flush priviliges;
mysql> exit
a) Stop the My SQL server process in shell
$/etc.init.d/mysql stop
b) Start the MySQL (mysqld) server/daemon process with the --skip-grant-tables option so that it will not prompt for password
$mysqld_safe –skip-grant-tables &
c) Connect to mysql server as the root user
mysql –u root
d) Setup new root password
mysql> use mysql;
mysql> > update user set password=PASSWORD(“NEWPASSWORD” )where user=’root’;
mysql> flush priviliges;
mysql> exit
e) Exit and restart MySQL server
$/etc.init.d/mysql stop
$/etc.init.d/mysql start
And now we can login to database with the new password we just set.
Taking the database Backup….
4) There is one simplest way to take the back up of a database by the below given command
$mysqldump –u [user] –p [databse] > backupfile.sql
Example:
$mysqldump -u root -p test1 > Mysql_backupfile.sql
By the above command we take the back up of “test1” database to a file “Mysql_backupfile.sql”.
To restore the database from a file is quite easier. Use the command below
$mysql –u [user] -p [database_to_be_restored] < Mysql_backupfile.sql
Example:
$mysql -u root -p test1 <
Executing queries from shell….
5) We can execute the insert/update queries from command prompt by using the following command.
$mysql [databse_name] < [filename] -u [user] -p
Example:
$mysql test1 < file1 -u root -p
Here in the file “file1” we can write our desired insert/update queries. (Each query terminated by a semicolon (;) and the next query in a new line). Execution of the command, prompts for the “root” user password, enter the corresponding password, the data in the “test1” database will be altered or inserted according to the queries given.
You can refer this link or contact me for any assistance in My SQL.