#!/bin/bash
cd /media
tar -zxvf mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz
cp mysql-5.6.35-linux-glibc2.5-x86_64/ /usr/local/mysql -r
groupadd mysql
useradd -r -g mysql mysql
cd /usr/local/mysql
chown -R mysql:mysql ./
./scripts/mysql_install_db --user=mysql
chown -R root:root ./
chown -R mysql:mysql data
cd /usr/local/mysql
cp ./support-files/mysql.server /etc/rc.d/init.d/mysqld
mkdir /var/log/mariadb
touch /var/log/mariadb/mariadb.log
chmod 777 /var/log/mariadb/mariadb.log
chkconfig --add mysqld &&service mysqld start
ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql
ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
service mysqld restart
cd /usr/local/mysql/bin
./mysqladmin -u root -h 127.0.0.1 password 'mysql'
mysql -h 127.0.0.1 -uroot -pmysql <<EOF
CREATE USER 'lawsonduan'@'127.0.0.1' IDENTIFIED BY '123456';
GRANT ALL ON *.* TO 'lawsonduan'@'%';
quit
EOF
centos7安装mysql5.6脚本
原创lawsonduan 博主文章分类:运维管理 ©著作权
文章标签 centos7安装mysql 文章分类 运维
-
centos7安装mysql8
centos7安装mysql8全过程
mysql Server MySQL -
centos6安装mysql5.6脚本
centos6安装mysql5.6脚本
centos6安装mysql5.6 -
CentOS7安装Mysql5.6详解
预备要点: 本次通过Yum软件管理器进行安装,需要对Yum有必要了解 .当前需要
mysql yum源 远程登录 -
centos7使用yum安装mysql5.6版本
centos7yum一键安装mysql5.6版本数据库
yum一键安装mysql5.6版本数据库 -
CentOS7 yum mysql5.6
CentOS7 yum mysql5.6
mysql5.6 CentOS7