Reset replication address in MySQL slave

So I come across an issue where I had to reset replication master in MySQL 5.1 (but it is the same I believe in later 5.X versions as well)

There is great blog here and below is the core of the steps needed:

Login on the slave as administrator

STOP SLAVE;

RESET SLAVE;

CHANGE MASTER TO MASTER_HOST="master_name_or_address", MASTER_USER="administrator_username", MASTER_PASSWORD="administrator_password", MASTER_LOG_FILE="logfile_from_master", MASTER_LOG_POS=position_from_master;

START SLAVE;

and a bit later verify using

SHOW SLAVE STATUS\G

To get the position and filename for the CHANGE MASTER command use the followin on the master server:

SHOW MASTER STATUS;

Any more details see the blog mentioned earlier.

Cheers

Print Friendly, PDF & Email

Condensed Linux disk mounting on Azure

So you just created a brand new drive to your VM. So now you need you VM to add this new data disk. So here is the short version of Azure instructions:
sudo grep SCSI /var/log/messages

locate the name of the new drive (if it is your second drive it should be /dev/sdc

sudo fdisk /dev/sdc

now we simply follow prompts: n p p w
sudo mkfs -t ext4 /dev/sdc1

this command will create the actual fielsystem usually default values are OK but if you know what you need enter the your values at the prompts – to accept default just press

sudo mkdir /datadrive

make directory for the drive to be mounted to

sudo mount /dev/sdc1 /datadrive

mount the drive pm your chosen directory (in our example it is /datadrive

sudo -i blkid

get the drive UUID for the fstab file we need to create

sudo vi /etc/fstab

edit the fstab file and enter the UDDID and mount point to let system mount this data drive at boot time

UUID=33333333-3b3b-3c3c-3d3d-3e3e3e3e3e3e /datadrive ext4 defaults 1 2

sample format line from vstab for our drive

 

Lastly dismount the drive and mout it again to make sure that all is correct in the fstab file:

sudo umount /datadrive
sudo mount /datadrive

That’s it your drive will not be accessible (mind your permissions of course) and will be reattached tot he system when the system reboots.

Cheers

Print Friendly, PDF & Email

no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory

If you come across this error:

no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory

It seems to happen on Ubuntu 12.04 and does not seem to be related to whether ti is a new install or upgrade, there appears to be a kind of solution (this will limit your password synchronization via Samba once done), and it is to remove samba/system password synch as follows:

sudo apt-get remove libpam-smbpass

It worked in my case as only use this for testing on Ubuntu so password synch doe snot matter to me.

Cheers

 

Print Friendly, PDF & Email