标签:usr 10g tab innodb 配置文件 添加 $path name efault
(1)准备数据目录
# fdisk -l
# fdisk /dev/sdb
# pvcreate /dev/sdb1
# vgs
# vgcreate yuyang /dev/sdb1
# lvcreate -L 10G -n mydata yuyang
# yum install xfsprogs
# modprobe xfs
# mkfs.xfs /dev/yuyang/mydata
# mkdir /mydata
# vim /etc/fstab
#添加
/dev/yuyang/mydata /mydata xfs defaults 0 0
# mount -a
# cd /mydata/
# mkdir data
# chown mysql.mysql data
(2)安装mariadb
# groupadd -r mysql
# useradd -r -g mysql mysql
# tar xf mariadb-5.5.59-linux-x86_64.tar.gz -C /usr/local/
# cd /usr/local/
# ln -sv mariadb-5.5.59-linux-x86_64/ mysql
# cd mysql/
# chown -R root:mysql ./*
# scripts/mysql_install_db --help
# scripts/mysql_install_db --user=mysql --datadir=/mydata/data
# echo ‘PATH=/usr/local/mysql/bin:$PATH‘ > /etc/profile.d/mysqld.sh
(3)准备配置文件
# mkdir /etc/mysql
# cd mysql/
# cd support-files/
# cp my-large.cnf /etc/mysql/my.cnf
# vim /etc/mysql/my.cnf
#添加:
innodb_file_per_table = on
skip_name_resolve = on
(4)启动服务
touch /var/log/mysqld.log
chown mysql.mysql /var/log/mysqld.log
service mysqld start
ss -tanl
标签:usr 10g tab innodb 配置文件 添加 $path name efault
原文地址:http://blog.51cto.com/2143754/2065703