實驗:centos 7.3二進制安裝mariadb10.2.8
1 rpm -qa mariadb*
2 getent passwd mysql
useradd -d /app/mysqldb -r -m -s /sbin/nologin mysql
3 tar xvf mariadb-10.2.8-linux-x86_64.tar.gz -C /usr/local/
cd /usr/local/
ln -s mariadb-10.2.8-linux-x86_64/ mysql
4 cd /usr/local/mysql/
mkdir /etc/mysql/
cp support-files/my-huge.cnf /etc/mysql/my.cnf
vim /etc/mysql/my.cnf
[mysqld]
datadir = /app/mysqldb
innodb_file_per_table = on
skip_name_resolve = on
5
scripts/mysql_install_db --user=mysql --datadir=/app/mysqldb
6 cp support-files/mysql.server /etc/init.d/mysqld
chkconfig --list mysqld
chkconfig --add mysqld
service mysqld start 失敗
7 mkdir /var/log/mariadb/
chown mysql /var/log/mariadb/
service mysqld start
8 vi /etc/profile.d/mysql.sh
PATH=/usr/local/mysql/bin:$PATH
. /etc/profile.d/mysql.sh
9 mysql_secure_installation
10 mysql -uroot -p
實驗:centos 7.3二進制安裝mariadb10.2.8