ftp://ftp.jaist.ac.jp/pub/mysql/Downloads/MySQL-5.1/mysql-5.1.72.tar.gz
rpm -qa | grep mysql
cd mysql
./configure --prefix=/usr/local/mysql --with-charset=gbk make make install
4.添加MySQL配置文件
如果你想要设置一个选项文件,使用support-files目录中的一个作为模板。在这个目录中有4个模板文件,是根据不同机器的内存定制的。
#cp support-files/my-medium.cnf /etc/my.cnf
5.设置开机自动启动
#cp support-files/mysql.server /etc/rc.d/init.d/mysqld #chmod 755 /etc/init.d/mysqld #chkconfig –-add mysqld #chkconfig –-level 345 mysqld on
cd /usr/local/mysql scripts/mysql_install_db --user=mysql
chown -R root chgrp -R mysql
/etc/rc.d/init.d/mysqld start
# netstat -altnp Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:<strong>3306 </strong> 0.0.0.0:* LISTEN 6946/mysqld tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1892/rpcbind tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 2726/dnsmasq
mysqladmin -u root password shallnet
搞定linux上MySQL编程(一):linux上源码安装MySQL
原文地址:http://blog.csdn.net/shallnet/article/details/46483661