安装mysql,安装前准备
如果mysql用户不存在,那么添加mysql用户
groupadd mysql
useradd -g mysql mysql
mysql编译安装
tar -zxvf mysql-5.1.73.tar.gz
cd mysql-5.1.73
yum install ncurses ncurses-devel
./configure ‘--prefix=/usr/local/mysql‘ ‘--without-debug‘ ‘--with-charset=utf8‘ ‘--with-extra-charsets=all‘ ‘--enable-assembler‘ ‘--with-pthread‘ ‘--enable-thread-safe-client‘ ‘--with-mysqld-ldflags=-all-static‘ ‘--with-client-ldflags=-all-static‘ ‘--with-big-tables‘ ‘--with-readline‘ ‘--with-ssl‘ ‘--with-embedded-server‘ ‘--enable-local-infile‘ ‘--with-plugins=innobase‘
make
make install
到此mysql就安装到了/usr/local/mysql路径下,下面开始mysql的配置工作
安装mysql选项文件
cp support-files/my-medium.cnf /etc/my.cnf
cp -r support-files/mysql.server /etc/init.d/mysqld
/sbin/chkconfig --del mysqld
/sbin/chkconfig --add mysqld