Thursday, February 20, 2014

Reset Password MySQL User

Reset Password MySQL User


Sometime we also forgot or miss mysql user password. and here are the way to reset password mysql user. But we need to have mysql root `s password.

If you are also forgot or miss mysql root`s password. 
Here is my previous article:  Recovery MySQL Root Password

HowTo -  Reset password mysql user.

1. Log in as root 
(In this example database server is "localhost", If  mysql server on different server we need to specify with -h option for database host.)
mysql -u root -p
2. Use mysql database and update new password for user "vannak"
use mysql;
UPDATE mysql.user SET Password=PASSWORD('NewPassw0rd') WHERE User='vannak' AND Host='localhost';
FLUSH PRIVILEGES;

Enjoy,
Below screen shoot is the full process HowTo:


Sunday, February 16, 2014

Configure Ethernet Channel Bonding

Configure Ethernet Channel Bonding


1. Why Ethernet channel Bonding?
2. How to

1. Why Ethernet channel Bonding?
Ethernet channel Bonding enable 2 or more Network Interfaces Card (NIC) to single virtual NIC card.
This is a great way to  achive redundant links, fault tolerance or load balancing.

2. HowTo
OS: Ubuntu 13.04

2.1 Installation
apt-get install ifenslave
2.2 Configuration
2.2.1 Check kernel support
vi /etc/modules
loop
lp
rtc
bonding

2.2.2 Enable module
modprobe bonding
2.2.3 Edit interface configuration
vi /etc/network/interfaces
-----------------------------------
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# eth0 - the first network interface
auto eth0
iface eth0 inet manual
hwaddress ether 00:0c:29:b0:00:80
bond-master bond0
# eth1 - the second network interface
auto eth1
iface eth1 inet manual
hwaddress ether 00:0c:29:b0:00:8a
bond-master bond0

# Network bond for eth0 and eth1
auto bond0
iface bond0 inet static
address 192.168.5.200
netmask 255.255.255.0
gateway 192.168.5.2
bond-mode 1
bond-miimon 100
slaves eth0 eth1
-----------------------------------
Show IP:



2.2.4 Checking bonding interface
cat /proc/net/bonding/bond0

Try to disable one of the NIC, IP: 192.168.5.200 still available,

Enjoy,