CentOS下的MySQL 5.1安装
01
wget http://mysql.llarian.net/Downloads/MySQL-5.1/mysql-5.1.63.tar.gz .解压 tar zvxf ./mysql-5.1..tar.gz .配置configure ./configure --prefix=/usr/local/mysql
www.2cto.com
--with-charset=utf8 --with-extra-charsets=all --with-tcp-port= --with-unix-socket-path=/tmp/mysql.sock --with-mysqld-user=mysqld --with-federated-storage-engine --with-mysqld-user=mysqld --with-plugins=innobase,myisam --enable-assembler --without-isam --with-client-ldflags=-all-static { 出现checking for termcap functions library... configure: error: No curses/termcap library found curses/termcap 库没有安装 下载wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz 解压 tar zxvf ncurses-5.9.tar.gz 进入目录 sudo ./configure --prefix=/usr --with-shared --without-debug 编译,安装 make , make install
www.2cto.com
} .编译,安裝 make make install .创建用户和组.配置 groupadd mysql useradd -g mysql mysql cp support-files/my-media.cnf /etc/my.cnf mkdir /usr/local/mysql/var 修改MySQL 数据目录的 ownership chown -R mysql /usr/local/mysql /usr/lib/mysql /usr/share/mysql chgrp -R mysql /usr/local/mysql /usr/lib/mysql /usr/share/mysql www.2cto.com .安装,启动,进入数据库. /usr/local/mysql/bin/mysql_install_db /user/local/mysql/bin/mysqld_safe /user/local/mysql/bin/mysql -u root .添加启动项 mv /usr/local/mysqlshare/mysql/mysql.server /etc/init.d/mysql chmod /etc/init.d/mysql chkconfig --add mysql