Mysql单实例数据库的安装

时间 : 14-06-14 栏目 : linux运维 作者 : 老薛 评论 : 0 点击 : 955 次

一、硬件环境: Dell PowerEdge R710 Inter E5620 2.4GHz 3*300GB SAS热插拔硬盘 4GB*8 内存

二、软件环境 Centos 5.8

三、安装mysql

3.1 添加用户
groupadd mysql
useradd -s /sbin/nologin -g mysql -M mysql

3.2 解压编译安装

tar zxvf mysql-5.0.56.tar.gz
cd mysql-5.0.56 ./configure \
--prefix=/usr/local/mysql \
--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock \
--localstatedir=/usr/local/mysql/data \
--enable-assembler \
--enable-thread-safe-client \
--with-mysqld-user=mysql \
--with-big-tables \
--without-debug \
--with-pthread \
--enable-assembler \
--with-extra-charsets=complex \
--with-readline \
--with-ssl \
--with-embedded-server \
--enable-local-infile \
--with-plugins=partition,innobase \
--with-plugin-PLUGIN \
--with-mysqld-ldflags=-all-static \
--with-client-ldflags=-all-static

make
make install
/bin/cp support-files/my-small.cnf /etc/my.cnf
mkdir -p /usr/local/mysql/data
/usr/local/mysql/bin/mysql_install_db --user=mysql
chgrp -R mysql /usr/local/mysql
cp support-files/mysql.server /usr/local/mysql/bin/
chmod 700 /usr/local/mysql/bin/mysql.server
/usr/local/mysql/bin/mysql.server start
echo "export PATH=$PATH:/usr/local/mysql/bin/" >>/etc/profile
source /etc/profile cp support-files/mysql.server /etc/init.d/mysqld
chmod 755 /etc/init.d/mysqld
chkconfig --add mysqld
service mysqld restart
mysql -uroot -p

###############end##########################

以上安装过程全部按照生产环境配置,可以直接复制使用

除非注明,文章均为( 老薛 )原创,转载请保留链接: http://www.bdkyr.com/xtyw002/144.html

Mysql单实例数据库的安装:等您坐沙发呢!

发表评论

8 + 9 = ?


博主微信号,很高兴为您提供帮助

随便看看

0