Manager of pid-file quit without updating file

Today one of my clients’ VPS suffered from CC attack and I had to manually stop the web environment and then restart it.However when i tried to restart it,it alwasys said “Starting MySQL. ERROR! Manager of pid-file quit without updating file.”

Then here are the steps on how to solve it.

us ps -A command to see the process ID of mysql

ps -A|grep mysql

it should be like this

8016 pts/2 00:00:00 mysqld_safe

8037 pts/2 00:00:00 mysqld

then kill them

kill -9 8037

kill -9 8016

lastly you can restart your MySQL and it should be no problem.

Transfer MySQL database via SSH

Today one of my friends met messy code when he was trying to transfer MySQL database,it may due to the code format of MYSQL data files,here i am going to write an article about how to transfer MySQL database via different VPS by SSH.

1.login to your former VPS via SSH

2.come to a folder you like

cd /home/dearroy

3.use mysqldump command to back up database and export it to current folder. Read More

Setting WHMCS cron job in LNMP

The day before yesterday i transferred PaulHost client area which was hosted on HostGator shared hosting to my own dedicated server with LNMP environment installed.

New environment was quite fast and unlimited,but what made me frustrated was the the original WHMCS cron job unable to work.so i have to add the cron job on new server again.

Firstly,type Crontab -e via SSH and then press “i”

Secondly,paste code below(change the value where your whmcs cron.php located):

0 0 * * * php -q /homeX/wwwroot/admin/cron.php

then press “Esc” and then type :wq to save and  finish editing.

 

Turn off MySQL logs and clean mysql-bin.0000* logs files

MySQL logs function is defaultly open in LNMP,but if your site is large it will create huge mysql-bin.0000* files in /usr/local/mysql/var/ folder.sometimes it could be 100+MB but sometimes it will come to several GB,thus causing MySQL cannot start normally.Now let’s talk how to clean mysql-bin.0000* logs files and turn off MySQL logs.

1.firstly type this command via ssh

/usr/local/mysql/bin/mysql -u root -p

Read More

Install EasyPanel on your VPS

EasyPanel is a free webhosting control panel designed by Chinese and combined with Kangle webserver environment.

To install EasyPanel,you  will just need to do several steps as follow:

yum -y install wget
wget http://www.kanglesoft.com/download/easypanel/ep.sh -O ep.sh
sh ep.sh

After installation,just login http://ip:3312/admin/ to finish all the process.

and

Admin control panel URL:  http://ip:3312/admin/
webhost control panel URL:  http://ip:3312/vhost/

Requirement:

64M ram and 100M disk at least