MARIADB binary Semi-automatic installation script

Source: Internet
Author: User

MARIADB binary Semi-automatic installation script

System Environment: CENTOSX86_64

MARIADB version: mariadb-5.5.36-linux-x86_64

#!/bin/bash

#auth: Code7

#description: auto-mariadb

#version: 1.0

Groupadd-r-G 306 MySQL

Useradd-r-G 306-u 306 MySQL

#创建mysql的组和用户

TAR-XVF mariadb-5.5.36-linux-x86_64.tar.gz-c/usr/local

Cd/usr/local

#把mariadb的安装包解压到/usr/local, and enter this directory

LN-SV Mariadb-5.5.36-linux-x86_64/mysql

#创建mariadb-5.5.36-linux-x86_64 Soft-connect MySQL

Cd/usr/local/mysql

Chown-r mysql:mysql./*

#进入mysql目录, modify the files in this directory to the owner and owner group of MySQL

Mkdir-pv/mydata/data chown Mysql:mysql/mydata/data

#创建mysql的数据目录 and modify this directory to MySQL's owner and owner Group

scripts/mysql_install_db--datadir=/mydata/data --user=mysql

#执行mysql_install_db script, set data directory and user

CP Support-files/mysql.server/etc/rc.d/init.d/mysqld

Chkconfig--add mysqld

#将mysql服务添加到系统启动服务中

Mkdir/etc/mysql

CP SUPPORT-FILES/MY-LARGE.CNF/ETC/MYSQL/MY.CNF

#配置mysql默认 (maximum) configuration file


Author something: 1. This script needs to be in the same directory or file as the installation package

2, why is said to be a semi-automatic installation package, this script cannot determine whether the installation of the server is already Mysql,id 306 is occupied by other users.


This article is from the "12136188" blog, please be sure to keep this source http://code7.blog.51cto.com/12136188/1859628

MARIADB binary Semi-automatic installation script

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.