mysql5.5的安装配置
1.wget http://120.52.72.23/cdn.mysql.com/c3pr90ntc0td//Downloads/MySQL-5.5/mysql-5.5.50-linux2.6-x86_64.tar.gz
2.tar -xvf mysql-5.5.50-linux2.6-x86_64.tar.gz -C /usr/local/
3.ln -s mysql-5.5.50-linux2.6-x86_64/ mysql
4.groupadd -r -g 306 mysql #-r 表示系统内部用户
useradd -g 306 -r -u 306 mysql
查看:id mysql
5.chown -R mysql.mysql /usr/local/mysql/*
6.初始化Mysql
创建挂载的数据目录,附件有LV的创建
mkdir /u02/data
chown -R mysql.mysql /u02/data
chmod o-rx /u02/data
scripts/mysql_install_db --user=mysql --datadir=/u02/data/
[root@new mysql]# chown -R root /usr/local/mysql/*
7. 加入系统服务
[root@new mysql]# cp support-files/mysql.server /etc/init.d/mysqld
chkconfig --add mysqld
8.配置mysql的配置文件
cp support-files/my-huge.cnf /etc/my.cnf
vim /etc/my.cnf
#cpu的个数乘以2
thread_concurrency = 4
datadir = /u02/data
9.设置环境变量
vim /etc/profile.d/mysql.sh
export PATH=$PATH:/usr/local/mysql/bin
10.将man加入man.config
vim /etc/man.config
MANPATH /usr/local/mysql/man
11.输出库文件
vim /etc/ld.so.conf.d/mysql.conf
/usr/local/mysql/lib
ldconfig -v
12.输出头文件
[root@new ~]# ln -s /usr/local/mysql/include/ /usr/include/mysql