安装mysql

 

安装mysql

shell> groupadd mysql

shell> useradd -g mysql mysql

shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -

shell> cd mysql-VERSION

shell> ./configure --prefix=/usr/local/mysql

shell> make

shell> make install

shell> scripts/mysql_install_db --user=mysql

shell> chown -R root  /usr/local/mysql

shell> chown -R mysql /usr/local/mysql/var

shell> chgrp -R mysql /usr/local/mysql

shell> cp support-files/my-medium.cnf /etc/my.cnf

shell> /usr/local/mysql/bin/mysqld_safe --user=mysql &

 

 

安装5.5版本

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql  -DMYSQL_DATADIR=/usr/local/mysql/data -DEXTRA_CHARSETS=all 

make

make install

 cp /home/lxu/mysql-5.5.20/support-files/my-huge.cnf /usr/local/mysql/my.cnf

vi /usr/local/mysql/my.cnf

chmod +w /usr/local/mysql

chown -R mysql:mysql /usr/local/mysql

cp /home/lxu/mysql-5.5.20/support-files/mysql.server /etc/init.d/mysql

chmod +x /etc/init.d/mysql

/sbin/chkconfig --add mysql

/sbin/chkconfig mysql on

 /usr/local/mysql/scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql

/usr/local/mysql/bin/mysqld_safe --defaults-file=/usr/local/mysql/my.cnf &

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值