11.6 Maria DB Installation
#cd/USR/LOCAL/SRC
Download MARIADB 10.2.6 64-bit
#wget https://downloads.mariadb.com/MariaDB/mariadb-10.2.6/bintar-linux-glibc_214
-x86_64/mariadb-10.2.6-linux-glibc_214-x86_64.tar.gz
Unpack the Package
#tar ZXVF mariadb-10.2.6-linux-glibc_214-x86_64.tar.gz
Move the extracted directory and name the/USR/LOCAL/MARIADB, because you want to differentiate it from the MySQL directory.
#mv mariadb-10.2.6-linux-glibc_214-x86_64/usr/local/mariadb
Check the above output results
#echo $?
0
Go to/usr/local/mariadb and initialize later
Initialize the command, specify user (user is MySQL) and DataDir (DataDir specified/data/mariadb will be self-
Dynamic generation)
#cd/usr/local/mariadb
#./scripts/mysql_install_db--user=mysql--datadir=/data/mariadb
[Email protected] mariadb]# ls/data/mariadb/
aria_log.00000001 ib_buffer_pool ib_logfile0 MySQL test
Aria_log_control ibdata1 Ib_logfile1 Performance_schema
CP configuration File
#cp support-files/my-small.cnf/usr/local/mariadb/my.cnf
Modify and define the Mysqld Basedir and DataDir are generally kept by default here
#vim/usr/local/mariadb/my.cnf
CP startup script definition Basedir and DataDir
#cp support-files/mysql.server/etc/init.d/mariadb
#vim/etc/init.d/mariadb//define BASEDIR, DataDir, conf, and startup parameters
Before starting, check the mysqld process is not on, because Mysqld and mariadb listening to the same port
At the same time, the start conflict
[[Email protected] mariadb]# PS aux |grep mysqld
Root 4935 0.0 0.0 112676 984 pts/0 s+ 17:26 0:00 grep--color=auto
Mysqld
Mysqld no boot, open mariadb
/ETC/INIT.D/MARIADB start
[[email protected] mariadb]#/etc/init.d/mariadb start
Reloading systemd: [OK]
Starting mariadb (via Systemctl): [OK]
[[email protected] mariadb]# echo $?
0
Check the status of the process and listening port, the process is displayed mysqld because MARIADB is Mysqld branch, so many
The name process has related mysqld words, but finally looks at the key information of MARIADB.
The configuration and usage of mysqld and mariadb are roughly the same.
11.6-11.9 mariadb installation, Apache installation