最新Mysql-5.1.35在RHEL5.3(CentOS5.3)编译安装步骤

来源:互联网 发布:蒙元 知乎 编辑:程序博客网 时间:2024/05/13 07:21

wget http://mysql.he.net/Downloads/MySQL-5.1/mysql-5.1.35.tar.gz
groupadd -g 6000 mysql
useradd -c "Mysql Server User Account " -g 6000 -u 6000 -s /sbin/nologin -M mysql
tar zxf mysql-5.1.35.tar.gz
cd mysql-5.1.35
./configure --prefix=/usr/local/mysql/ --bindir=/usr/bin/ --sbin=/usr/sbin/ --sysconfdir=/etc/ --libdir=/usr/lib/ --includedir=/usr/include/ --mandir=/usr/share/man/ --enable-assembler  --enable-profiling --with-charset=gb2312 --with-extra-charsets=gb2312 --with-system-type=i686-redhat-linux-gnu --with-machine-type=i686-redhat-linux-gnu --with-server-suffix=-mysql --with-pthread  --with-unix-socket-path=/tmp/mysql.sock --with-mysqld-user=mysql  --with-zlib-dir=/usr/  --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --with-low-memory  --with-comment=compiled-by-WinLinKer --with-big-tables --with-mysqlmanager --with-plugins=all --with-embedded-server --with-embedded-privilege-control
make
make install
cd /usr/local/mysql
chown -R root.mysql .
cp share/mysql/my-huge.cnf /etc/my.cnf
cp share/mysql/mysql.server  /etc/init.d/mysqld
chmod u+x /etc/init.d/mysqld
mysql_install_db --user=mysql
chkconfig --add mysqld
chkconfig --level 345 mysqld on
然后service mysqld start
mysqladmin -u root password pass (设置密码)
例如:mysqladmin -u root password 8Xi3o34k4OBpPFp
ok,就这么简单,希望各位安装顺利。


原创粉丝点击