1 ) How to relocate the data dir while installing the MySQL-server-5.5.18-1.linux2.6.i386.rpm.
rpm -ivh MySQL-server-5.5.18-1.linux2.6.i386.rpm
1 ) How to relocate the data dir while installing the MySQL-server-5.5.18-1.linux2.6.i386.rpm.
rpm -ivh MySQL-server-5.5.18-1.linux2.6.i386.rpm
If a my.cnf is present when MySQL is installed, it will override any default settings with the values specified there. So you can simply create your /etc/my.cnf with the following content: