Category Archives: Mysql

How to remove a logical volume

SSH to server and use the below steps

Check active volume first using

[root@load ~]# lvscan
ACTIVE            ‘/dev/vg_load/lv_root’ [50.00 GiB] inherit
ACTIVE            ‘/dev/vg_load/lv_home’ [53.80 GiB] inherit
ACTIVE            ‘/dev/vg_load/lv_swap’ [7.50 GiB] inherit

Say you want to remove the volume /dev/vg_load/lv_home

Type the below command

[root@load ~]# lvremove /dev/vg_load/lv_home
Do you really want to remove active logical volume lv_home? [y/n]: y
Logical volume “lv_home” successfully removed

Now the logical volume is deleted

which you can confirm using

[root@load ~]# lvscan
ACTIVE            ‘/dev/vg_load/lv_root’ [50.00 GiB] inherit
ACTIVE            ‘/dev/vg_load/lv_swap’ [7.50 GiB] inherit
[root@load ~]# lvdisplay
— Logical volume —
LV Path                /dev/vg_load/lv_root
LV Name                lv_root
VG Name                vg_load
LV UUID                jFKRVb-kzMk-bOkE-DZIR-T5PW-fkyf-Tb6txr
LV Write Access        read/write
LV Creation host, time load.onlinesupport4u.in, 2014-04-07 00:28:58 -0400
LV Status              available
# open                 1
LV Size                50.00 GiB
Current LE             12800
Segments               1
Allocation             inherit
Read ahead sectors     auto
– currently set to     256
Block device           253:0

— Logical volume —
LV Path                /dev/vg_load/lv_swap
LV Name                lv_swap
VG Name                vg_load
LV UUID                zNsC2f-9vxE-9cgA-6eFv-0Yrk-JWqG-GFEsId
LV Write Access        read/write
LV Creation host, time load.onlinesupport4u.in, 2014-04-07 00:29:30 -0400
LV Status              available
# open                 1
LV Size                7.50 GiB
Current LE             1920
Segments               1
Allocation             inherit
Read ahead sectors     auto
– currently set to     256
Block device           253:1
 

Domain name Transfer

To transfer the domain name from your old domain registrar to us                                             Please apply using below URL

Once done please make sure the at your old domain registrar

1) You need to disable the privacy Protection                                                                                  2) Disable Theft Protection                                                                                                                 3) Get the EPP or Authorization code and email it to us at support@onlinesupport4u.in along with domain name

Domain name transfer take minimum 5 days to get transferred.

 

The mod_security plugin could not connect to the database: cPanel

If you have been getting the error “The mod_security plugin could not connect to the  database”

Below are the steps to rectify it

SSH to server

Check the password set for modsec database using below command,

In my case below was the password

root@vps [~]# grep “dbpassword” /etc/cron.hourly/modsecparse.pl

my $dbpassword = ‘qS_lqkU5mXkA’;
my $dbh  = DBI->connect( “DBI:mysql:$dbname:$dbhost”, $dbuser, $dbpassword )

The password set in my case as  qS_lqkU5mXkA

Now login into mysql and use below steps

root@vps [~]# mysql

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1569
Server version: 5.5.36-cll MySQL Community Server (GPL)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> UPDATE user SET Password=PASSWORD(‘qS_lqkU5mXkA’) WHERE USER=’modsec’;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit

Login to WHM >> Plugin > Mod_security

You should be able to see working Mod_security

Repair table in Virtualizor

Facing issues in Virtualizor for database crash ? The mysql library is not located in normal  /var/lib/mysql it located in /usr/local/emps/bin/

To repair database you need to use below command

[root@hostabc.virtualizor]# /usr/local/emps/bin/myisamchk -r *.MYI

Once completed all things should back to normal 🙂