Latest Event Updates

Change the email notification subject for the MySQL ZRM report

Posted on Updated on

Normally MySQL ZRM backup results are sent out in the form

[ZRM for MySQL Report] ERROR during backup of backup-set Domain_name

. If you want to customize the subject line, edit the following file and edit accordingly.

 vi /usr/bin/mysql-zrm-backup 

Search and find the subject line and edit accordingly.

Check the email password in plesk

Posted on Updated on

You can use the below command to see all the email address and its passwords :

/usr/local/psa/admin/sbin/mail_auth_view

Guitar

How to validate IP address in bash

Posted on

 
#Validating IP addess
if [[ "$ip_server" =~ ^([0-9]{1,3})[.]([0-9]{1,3})[.]([0-9]{1,3})[.]([0-9]{1,3})$ ]]
then
    for (( i=1; i<${#BASH_REMATCH[@]}; ++i ))
    do
      (( ${BASH_REMATCH[$i]} &2; exit 1; }
    done
else
      echo "Check the IP address" >&2
      exit 1;
fi

Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.

Posted on

I got the below error while restarting mysql service after updating the my.cnf file :

 [ERROR] Plugin ‘InnoDB’ init function returned error.
 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
 [ERROR] Unknown/unsupported storage engine: INNODB
 [ERROR] Aborting 

Just followed the below steps to resolve the issue :

cd /var/lib/mysql
mv ibdata1 ib_logfile0 ib_logfile1 /tmp/

Note that my datadir was /var/lib/mysql. Change the location accordingly.

service mysqld restart

[root@theg-01 mysql]# service mysqld restart
Stopping mysqld:                                           [  OK  ]
Starting mysqld:                                           [  OK  ]

Thats it :)

Install Skype in Ubuntu 14.04

Posted on Updated on

A new update of Skype version (Skype 4.2) is available for Ubuntu distributions. Use the below method to install :

1. Remove the existing ones “

$ sudo apt-get remove skype skype-bin

2. Download the debian package from the skype website :

$ sudo wget http://download.skype.com/linux/skype-ubuntu-precise_4.2.0.11-1_i386.deb

3. Install :

$ sudo dpkg -i skype-ubuntu*.deb; sudo apt-get -f install

4. Install the below necessary packages if not already installed :

In 32 bit :

$ sudo apt-get install sni-qt

In 64 bit :

sudo apt-get install sni-qt sni-qt:i386

That’s it! :)

MySQL Master-Master Replication

Posted on Updated on

For MySQL servers above 5.5, use the below method :

Suppose servers are

server1=0.0.0.1
Server2=0.0.0.2

In Server1, change the /etc/mysql/my.cnf

server-id               = 1
log_bin                 = /var/log/mysql/mysql-bin.log
#bind-address           = 127.0.0.1

Server2, change the /etc/mysql/my.cnf

server-id               = 2
log_bin                 = /var/log/mysql/mysql-bin.log
#bind-address           = 127.0.0.1

In server1,

mysql> CREATE USER 'slave1'@'0.0.0.2' IDENTIFIED BY 'O$c@r$lavE';
mysql> GRANT REPLICATION SLAVE ON *.* TO 'slave1'@'0.0.0.2';

FLUSH TABLES WITH READ LOCK;

mysqldump -u root -p --all-databases --master-data > /data_dump.sql

copy to server2

CHANGE MASTER TO   MASTER_HOST='0.0.0.1',   MASTER_USER='slave1',   MASTER_PASSWORD='O$c@r$lavE',   MASTER_PORT=3306,   MASTER_LOG_FILE='mysql-bin.000002',   MASTER_LOG_POS=107;

start slave;

In server1,

unlock tables;

In server2,

mysql> CREATE USER 'slave2'@'0.0.0.1' IDENTIFIED BY 'O$c@r$lavE';
mysql> GRANT REPLICATION SLAVE ON *.* TO 'slave2'@'0.0.0.1';

FLUSH TABLES WITH READ LOCK;

show master status\G

In server1,

mysql> CHANGE MASTER TO   MASTER_HOST='0.0.0.2',   MASTER_USER='slave2',   MASTER_PASSWORD='O$c@r$lavE',   MASTER_PORT=3306,   MASTER_LOG_FILE='mysql-bin.000001',   MASTER_LOG_POS=537678;

In server2,

unlock tables;

Now create a database in server1 and check whether it is replicated in server2. If so, drop the database from server2 and confirm that it is removed from the server1 as well.

Thanks :)

Configure proxy in Ubuntu 14.04

Posted on

Download and install cntlm package from  : http://sourceforge.net/projects/cntlm/
Edit /etc/cntlm.conf

Give credentials in the below fields

username
domain
password
proxy  IP:Port
Note down the Listen port… say it is 3128
save

Select Network options in Ubuntu and choose network proxy
Give 127.0.0.1 port 3128
/etc/init.d/cntlm restart

 

Thats it !