#!/bin/bash
#wirte by badb0y
groupadd mysql
useradd -g mysql mysql
cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
sed -i 's/skip-federated/#skip-federated/g' /etc/my.cnf
/usr/local/mysql/bin/mysql_install_db --user=mysql
chmod +w /usr/local/mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql/.
cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysql
chmod 755 /etc/init.d/mysql
chkconfig --level 345 mysql on
service mysql start
----------------------------------------------------------
原文地址:http://blog.chinaunix.net/u/249/showart_1842843.html
阅读(895) | 评论(0) | 转发(0) |