Archive for January, 2009

To change or remove mysql passwd

first login to mysql, then

#mysql -u root -p

to change root pwd

sql> USE mysql;
sql> UPDATE user SET password=PASSWORD(‘yournewpass’) WHERE user=’root’ ;
sql> FLUSH privileges;

to remove pwd

sql> USE mysql;
sql> UPDATE user SET password=PASSWORD(”) WHERE user=’root’ ;
sql> FLUSH privileges;

Add comment January 31, 2009

Steps to do when load average is high

when load average is high

free -m
netstat -plan | grep :80 | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -n | tail ; date

/etc/init.d/mysql status
/etc/init.d/httpd status
mysqlcheck -u root -p databasename —–>to check database

To find pid of httpd

cat /usr/local/apache/logs/httpd.pid —->in server with cpanel only for apache,
for other application the location is
/var/run same as local server.
cat /var/run/httpd.pid —->in local server

or
ps -efw | grep httpd | head -1

To view httpd log message:

tail /var/log/httpd/error_log —–>in local server
tail /var/log/httpd/access_log —–>in local server
tail /usr/local/apache/log/error_log —->in server with cpanel only for apache
tail /usr/local/apache/log/access_log —->in server with cpanel only for apache

Check Zombie process

ps -elf | grep Z
ps -el | grep Z
ps aux | awk ‘{print $8″ “$2}’ | grep -w

if necessary

killall -9 httpd

killall -9 mysql —->to kill mysql process

Add comment January 31, 2009

Previous Posts


Categories

current online

Feeds

Blogroll

Archives

Category Cloud

400 MB Movie List Bollywood Movies E-Books Earn money Funny Videos Games Cheat Code General Health Hollywood Movies IPL Linux Linux cmds Mail Server Mobile Mobile Secret Codes Movie Download Movie Photos MP3 Download Music Mysql Nagios News Nrpe Online Movies PC Games PS2 Games Sports Trailer Video Songs WWE

Email Subscription

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

sa

Sign up for our free email newsletter

Enter your email address:

Delivered by FeedBurner