mariadb安装步骤
下载地址:https://downloads.mariadb.org/mariadb/10.2.10/
##
[client]
port = 3306
socket = /data/MySQL/data/mysql.sock
[mysql]
prompt = "\u@rac2 \R:\m:\s [\d]> "
[mysqld]
user = mysql
port = 3306
basedir = /opt/mysql
datadir = /data/mysql/data
socket = /data/mysql/data/mysql.sock
slow_query_log = 1
slow_query_log_file = /data/mysql/data/slow.log
log-error = /data/mysql/data/error.log
long_query_time = 0.5
log_queries_not_using_indexes =1
log_throttle_queries_not_using_indexes = 60
log_slow_admin_statements = 1
log_slow_slave_statements = 1
server-id = 3306
log-bin = /data/mysql/data/mybinlog
sync_binlog = 1
expire_logs_days = 30
transaction_isolation = REPEATABLE-READ
innodb_buffer_pool_size =50M
innodb_buffer_pool_instances = 1
innodb_buffer_pool_load_at_startup = 1
innodb_buffer_pool_dump_at_shutdown = 1
#innodb_data_file_path = ibdata1:50M:autoextend
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size = 32M
innodb_log_file_size = 50M
innodb_log_files_in_group = 2
innodb_max_undo_log_size = 200M
###
alias mysql3306='/opt/mysql/bin/mysql
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=0
enabled=1
yum install boost
yum install MariaDB-server MariaDB-client
sudo systemctl start mariadb
sudo /etc/init.d/mysql start
参考地址:https://mariadb.com/kb/en/library/yum/
参考地址:
https://downloads.mariadb.org/mariadb/repositories/#mirror=neusoft&distro=CentOS&distro_release=centos6-amd64--centos6&version=10.2
## 源码安装
安装包mariadb-10.2.10.tar
软件目录 /opt/mysql
数据目录 /data/mysql/data
yum install -y ncurses-devel openssl-devel openssl gcc-c++ cmake
groupadd mysql
useradd -g mysql mysql
[mysqld]
datadir=/data/mariadb/data
socket=/data/mariadb/data/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/data/mariadb/data/mysqld.pid