MariaDB binary installation, mariadb binary

Source: Internet
Author: User

MariaDB binary installation, mariadb binary

Download the binary installation package

wget http://mirrors.neusoft.edu.cn/mariadb//mariadb-10.2.12/bintar-linux-x86_64/mariadb-10.2.12-linux-x86_64.tar.gz

Create a mysql user and group

useradd -r mysql -s /sbin/nologin

Decompress the binary installation package to/usr/local.

tar xf mariadb-10.2.12-linux-x86_64.tar.gz -C /usr/local

Create soft link

cd /usr/local/ln -s mariadb-10.2.12-linux-x86_64/ mysql

Set directory owner Group

chown -R mysql.mysql mysql/

 

Configure system environment variables

cd mysql/binecho 'PATH=/usr/local/mysql/bin:$PATH' > /etc/profile.d/mysql.sh. /etc/profile.d/mysql.sh

Mount the logical volume that stores data to/data/mysqldb

mkdir -pv /data/mysqldbblkidecho 'UUID=45943ceb-06b8-4cb8-8c73-53c751956288 /data/mysqldb xfs defaults 0 0' >> /etc/fstabmount -a

Set database folder owner Group Permissions

chown -R mysql.mysql /data/mysqldb/chmod 770 /data/mysqldb/

Create Database Files

cd /usr/local/mysqlscripts/mysql_install_db --datadir=/data/mysqldb --user=mysql

Copy the sample configuration file

cd support-files/cp my-huge.cnf /etc/my.cnf

Modify my. cnf configuration file

Start script

Cp mysql. server/etc/init. d/mysqldll/etc/init. d/mysqld # Check whether the chkconfig -- add mysqldservice mysqld start has the execution permission

Security Initialization

mysql_secure_installation

Test Logon

 

Related Article

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.