IPv6 disabling script for Ubuntu.

Hey Guys…

Hope you are doing well here’s a small script to help you to disable IPv6 on your Ubuntu Box.

hope you will find this helpful, let me know if you face any issue with this.

 

#########################################
##Author: Shivam Shukla ##
##Build Date: 22-07-2014 ##
##Modification Date: NA ##
##Version: 1.0.0 ##
##Tool: Ubuntu IPv6 Disabler ##
#########################################
#!/bin/bash
clear
int=$(netstat -i | cut -d" " -f1 | egrep -v "^Kernel|Iface|lo|:" |head -1)

ip -6 addr show dev $int |cut -b 5-9 >/tmp/ipp

grep "inet6" /tmp/ipp >/dev/null 2>&1 && ip_v=1 || ip_v=0

i6=$(ip addr show dev $int | sed -e's/^.*inet6 \([^ ]*\)\/.*$/\1/;t;d')
if [ $ip_v -eq 1 ]

then
echo "echo IPv6 found...";
echo "The IPv6 address is $i6";
echo "Disabling IPv6 address...";
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf
sysctl -p
echo "IPv6 address disable success... :)"
else
echo "IPv6 is already disabled."

fi

rm -f /tmp/ipp

How to disable IPv6 in Ubuntu

Hey Guys…

Welcome back again, in this post I will be guiding you on how to disable IPv6 on your Ubuntu box.

Step 1: login to the Ubuntu terminal.

Step 2: use command ifconfig to check the status of IPv6 on the machine.

If the IPv6 address is assigned then the output is as shown below.

u2

Step 3: Now to disable the IPv6 use the below command.

Edit the /etc/sysctl.conf file by the command

sudo vi /etc/sysctl.conf or sudo gedit  /etc/sysctl.conf

Add the below lines to the end of the file & save it.

net.ipv6.conf.all.disable_ipv6 = 1

net.ipv6.conf.default.disable_ipv6 = 1

net.ipv6.conf.lo.disable_ipv6 = 1

After saving the file use the below command to make the new settings effective.

sudo sysctl –p

Step 4: After disabling the IPv6 cross-check the status by the command ifconfig.

The sample output is shown below.

u5

hope you will find this post useful..

Thanks…

 

Fixing MySQL After Encountering “Cannot proceed because system tables used by Event Scheduler were found damaged at server start” when running SQL queries to create events.

Hi Guys.

This post is about MySQL error “Cannot proceed because system tables used by Event Scheduler were found damaged at server start”. This error was encountered by me while trying to upgrade the MySQL version  in CentOS, The reason for the upgrade being the old MySQL version was not having support for event scheduling. After the upgrade was completed when I tried to create the events table the error popped up.

Here is work around which worked out for me.

Step 1: open the terminal

Step 2: execute the command “mysql_upgrade -p –force” without quotes make sure you have the permissions to do so

Step 3: after the second step execute this command “service mysql restart” or “service mysqld restart” without quotes which ever works in your case.

now try to recreate the events table that should work out now.

Please do let me know if you found this post useful.

Thanks…