Centos 5.5源码安装mysql数据库

环境:Centos 5.X
目录约定
数据库安装目录:/usr/local/webserver/mysql/           数据存放目录:/data/mysql/data
usr/sbin/groupadd mysql
/usr/sbin/useradd -g mysql mysql
tar zxvf mysql-5.5.3-m3.tar.gz
cd mysql-5.5.3-m3/
./configure --prefix=/usr/local/webserver/mysql/ --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile --with-plugins=partition,innobase,myisammrg
make && make install

cp   support-files/my-medium.cnf    /etc/my.cnf
chmod +w /usr/local/webserver/mysql
chown -R mysql:mysql /usr/local/webserver/mysql
chown -R mysql:mysql /data/mysql/data
/usr/local/webserver/mysql/bin/mysql_install_db --basedir=/usr/local/webserver/mysql --datadir=/data/mysql/data --user=mysql

cp /usr/local/webserver/mysql/share/mysql/mysql.server /etc/init.d/mysqld
修改mysqld脚本
service mysqld start

您可以选择一种方式赞助本站

支付宝转账赞助

支付宝扫一扫赞助

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

图片 表情