MARIADB Linux binary tar package installation

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.