Thanks Alien Bob for replying
I have root in /dev/sda8 where /var/lib/mysql is situated
If I format /dev/sda8 I will lost all of the MySQL data. So I want to keep /home/userName/MySQL as datadir.
If I created symbolic link, then will I be able to get data if I format /dev/sda8 and reinstall Slackware again? I'm little bit of unsure.
I tried creating hardlink but, it is not allowing for directories.
So I tried editing /etc/my.cnf for changing the datadir. But MySQL says, mysql.sock doesn't exist. It would be a great help if you guide me or suggest me some tutuorials..