Posts

Showing posts from July, 2012

Solution: "MySQL is running but PID file could not be found"

If sometime, mysql status shows that " ERROR! MySQL is running but PID file could not be found ", after checking the mysql status like below: etc/init.d/mysql status ERROR! MySQL is running but PID file could not be found To solve this issue, please kill all the mysql daemon. ps aux | grep mysql kill -9 pid1 pid2 ... Now start the mysql, /etc/init.d/mysql start  

Reset forgotten mysql root password

Here is the steps to reset mysql password in case of one forget it. Note: One must have linux root login credential. Step 1: Open a terminal, and login using root linux password. Firstly, stop mysql daemon, using the below command: /etc/init.d/mysql stop or, service mysql stop Step 2: Start the mysql server manually without permission of tables which will allow to login as root user without password. Use the following command: mysqld_safe --skip-grant-tables 120730 08:53:40 mysqld_safe Logging to '/var/lib/mysql/MBS-APPS.err'. 120730 08:53:40 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql Step 3: Now open a new window and start mysql without any password: mysql --user=root mysql Step 4: Now reset the mysql root password, UPDATE user SET password=PASSWORD('newpassword') WHERE user='root'; flush privileges; exit; Step 5: Password will successfully reset. Now kill all mysqld process. ps -ef|grep -i mysql   kill -

To extract substring between two character: Shell Script

var1='mysql-' var2='-linux' mysqlFromWhichCommand=/usr/local/mysql-5.1.38-linux-i686-icc-glibc23/bin/mysql versionMysql=`echo "$mysqlFromWhichCommand" | sed -e "s/.*${v1}//;s/${v2}.*//"`` echo "MySql version: $versionMysql"

Azim Dada, no more ..... innalillah he wa inna ilaihe rajeoun

Yesterday on 9th June, 2012, Azim dada, one of my cousins passed away. May Allah bless him and his family with peace. He was around 36 yrs, with two boy (one at class 7th and other is  yrs old) and a daughter (3 years old). Very funny, well mannered, well build, helpful personality he had. He owned a bi-cycle shop near Beta-Sineth more. Cause of death was, due to minor accident in bypass of Durgapur Expressway, near Moshat. Allah, please save his family.