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

本文提供了一份详细的 MySQL 5.1 版本的手动安装指南,包括了用户组及用户创建、软件包下载、配置、编译、安装及启动等步骤,并附带了设置初始密码的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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,就这么简单,希望各位安装顺利。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值