首页 > 代码库 > 编译安装mysql-5.5.28

编译安装mysql-5.5.28

# groupadd -r mysql
# useradd -g mysql -r -s /sbin/nologin -M -d /mydata/data mysql
# chown -R mysql:mysql /mydata/dat


# tar xf mysql-5.5.28-linux2.6-i686.tar.gz -C /usr/local
# cd /usr/local/
# ln -sv mysql-5.5.28-linux2.6-i686  mysql
# cd mysql

# chown -R mysql:mysql  .
# scripts/mysql_install_db --user=mysql --datadir=/mydata/data
# chown -R root  .


# cd /usr/local/mysql
# cp support-files/my-large.cnf  /etc/my.cnf


# cd /usr/local/mysql
# cp support-files/mysql.server  /etc/rc.d/init.d/mysqld
# chmod +x /etc/rc.d/init.d/mysqld

添加至服务列表:
# chkconfig --add mysqld
# chkconfig mysqld on


本文出自 “ngames” 博客,请务必保留此出处http://ngames.blog.51cto.com/3187187/1563629

编译安装mysql-5.5.28