cp support-files/mysql.server /etc/init.d/mysqld
vim /etc/profile.d/mysql.sh
PATH=/usr/local/mysql/bin:/usr/local/mysql/lib:$PATH
export PATH
source /etc/profile.d/mysql.sh
启动MySQL并增加启动项
service mysqld start
chkconfig mysqld on
设置MySQL登录权限
drop user ''@localhost;
drop user ''@hostname;
update mysql.user set password=password('*******');
flush privileges;
至此,MySQL编译安装完成。