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
本文来自投稿,不代表Linux运维部落立场,如若转载,请注明出处:http://www.178linux.com/87909
评论列表(1条)
官网有专门的systemd的安装包,可以试试。新版本对init的服务启动兼容不友好啦