Public domain
mysql_install_db --user=mysql
chmod +x /etc/rc.d/rc.mysqld
/etc/rc.d/rc.mysqld start
drop database test;
delete from mysql.user where user='';
set password for 'root'@'localhost' = password ('new-password');
set password for 'root'@'127.0.0.1' = password ('new-password');
set password for 'root'@'HOSTNAME' = password ('new-password');
sed -i -e 's,^SKIP="--skip-networking",#SKIP="--skip-networking",' /etc/rc.d/rc.mysqld
/etc/rc.d/rc.mysqld restart
BY: Pejman Moghadam
TAG: mysql
DATE: 2011-06-08 09:30:03