Download
Address:https://downloads.mariadb.org/
Release the installation package assuming the installation location is/USR/LOCAL/MARIADB package name: mariadb-10.1.19-linux-x86_64.tar.gz
Tar-xvzf mariadb-10.1.19-linux-x86_64.tar.gz
MV mariadb-10.1.19-linux-x86_64/usr/local/mariadb/
Cd/usr/local/mariadb
?
Related configuration
Back up the original MySQL configuration:? mv?/etc/my.cnf/etc/my.cnf.bak
Copy configuration file: Cp?support-files/my-huge.cnf/etc/my.cnf?
Edit profile: Vim/etc/my.cnf? In the [MYSQLD] block, add the Basedir Global directory to the default data directory, log directory, PID files are placed in the Basedir directory, configured as follows:
Basedir =/usr/local/soft/mariadb/mariadb-10.2.9-linux-x86_64
Skip_name_resolve?=? On??
Innodb_file_per_table?=? On
?
Create user
For initial installation, create MySQL users and groups and give permissions to the current directory:
Groupadd MySQL
Useradd-r-G mysql-s/sbin/nologin MySQL
cd/usr/local/soft/mariadb/mariadb-10.2.9-linux-x86_64/
Chown-r MySQL.
Chgrp-r MySQL.
Then perform an initialization installation: scripts/mysql_install_db--user=mysql?
To adjust permissions:
Chown-r Root.
Chown-r MySQL data/
?
Startup scripts
/usr/local/soft/mariadb/mariadb-10.2.9-linux-x86_64/bin/mysqld_safe--user=mysql &?
Add MySQL to System services directory:? cp?/usr/local/soft/mariadb/mariadb-10.2.9-linux_x86_64/support-files/mysql.server/etc/init.d/ Mysqld?
If you have previously installed MySQL, then it is now started, the first installation requires manual start-up service:?/etc/init.d/mysqld start?
Add mysqld to system service, start with system:? Chkconfig mysqld on?
To view the MySQL service running status:? SYSTEMCTL status Mysqld.service
?
Setting the database to allow remote links
Mysql-u root-proot?
Mysql>grant all privileges on * * to? ' root ' @ '% '? Identified by ' Youpassword ' with GRANT OPTION;
after the operation, remember to perform the following command refresh Permissions ?
FLUSH privileges?
?
?
MARIADB Linux binary tar package installation