I. Introduction of MARIADB
MARIADB is a relational database program that MySQL was re-developed by the original author after being acquired by Oracle, and because it is the same author, it is very similar to MySQL in operation, and the versions correspond to each other. such as: MariaDB5.5 corresponds to the 5.5 version of MySQL, but the corresponding version of the mariadb from Mysql5.6 to become more than 10, such as: MariaDB10.1 corresponding Mysql5.6
Ii. Introduction of the environment
MARIADB has compiled installation, RPM package installation, using the binary program 3 different installation methods, this article takes the mariadb10.2.13,centos6.9 system as an example, introduces the compilation installation
Third, installation steps
1. Installing the CMake tool (slightly)
The version after Mysql5.5 uses CMake instead of the original make compilation tool, using the Ccmake command in the source package directory to view the options available at compile-time installation
2. Create a MySQL account
Useradd-s/sbin/nologin-m MySQL
3. Create the installation directory
Mkdir-pv/data
Chown-r Mysql.mysql/data
4. Upload mariadb source code and unzip the installation
TAR-XF mariadb-10.2.13.tar.gz-c/tmp/
cd/tmp/mariadb-10.2.13/
CMake. -dcmake_install_prefix=/usr/local/mariadb-10.2.13 \
-dmysql_datadir=/data \
-dmysql_unix_addr=/data/mysql.sock \
-denabled_local_infile=on \
-dwith_innobase_storage_engine=1 \
-dwith_federated_storage_engine=1 \
-dwith_blackhole_storage_engine=1 \
-dwithout_example_storage_engine=1 \
-dwithout_partition_storage_engine=1 \
-dwith_fast_mutexes=1 \
-dwith_zlib=bundled \
-denabled_local_infile=1 \
-dwith_readline=1 \
-dwith_embedded_server=1 \
-dwith_debug=0
Make && make install
Ln-sv/usr/local/mariadb-10.2.13/usr/local/mysql
5. Initializing the database
Cd/usr/local/mysql/scripts
./mysql_install_db--basedir=/usr/local/mysql \
--datadir=/data \
--skip-name-resolve \
--user=mysql \
--skip-auth-anonymous-user
6. Adding startup scripts and configuration files
Cd/usr/local/mysql/support-files
CP Mysql.server/etc/init.d/mysqld
CP MY-HUGE.CNF/ETC/MY.CNF
Chkconfig--add mysqld
7. Modify the configuration file and add two items
Vim/etc/my.cnf
Skip-name-resolve = No Name resolution at startup
Innodb_file_per_table =1# to start a stand-alone table space
8. Export environment variables
Vim/etc/profile.d/mysqld
Export Path=/usr/local/mysql/bin: $PATH
Source/etc/profile.d/mysql
At this point, the installation is complete, using service mysqld start
The installation of the 1--mariadb of the first knowledge mariadb