Percona-Server-5.5.33二进制安装
一、删除percona server
1.关闭mysqld service mysqld stop,再删除 rm -rf /etc/my.cnf
2.删除rm -rf /usr/local/Percona-Server-5.5.33-rel31.1-566.Linux.x86_64文件夹
3.删除软链接 rm -rf /usr/local/mysql
4.chkconfig --del mysqld
删除rm -rf /etc/init.d/mysqld
5.删除mysql用户,和组 /usr/sbin/userdel mysql
6.去掉环境变量
[root@tthost3 ~]# cat uninstall.sh
#!/bin/bash
/sbin/service mysqld stop &&
/bin/rm -rf /etc/my.cnf &&
/bin/rm -rf /usr/local/Percona-Server-5.5.33-rel31.1-566.Linux.x86_64 &&
/bin/rm -rf /usr/local/mysql &&
/sbin/chkconfig --del mysqld &&
/bin/rm -rf /etc/init.d/mysqld &&
/usr/sbin/userdel mysql
二、自动安装
说明:
1.将二进制percona文件:Percona-Server-5.5.33-rel31.1-566.Linux.x86_64.tar.gz拷贝到 /usr/local目录中
2.基本的目录(percona解压文件软连接到/usr/local/mysql):
MYSQL_DIR="/usr/local"
DATA_DIR="/usr/local/mysql/data"
BASE_DIR="/usr/local/mysql"
3.将脚本拷贝到/root目录下,赋执行权限直接执行就好了
4.需要增加判断,是否已经安装有mysql了,安装过就直接退出了
[root@tthost3 ~]# cat mysqinstall.sh
#!/bin/bash
MYSQL_DIR="/usr/local"
DATA_DIR="/usr/local/mysql/data"
BASE_DIR="/usr/local/mysql"
echo "-------checking mysql ENV now! please wait-------"
username=`cat /etc/passwd|grep mysql|cut -c 1-5`
if [[ $username == "mysql" ]];then
echo "user check,mysql user already have,can not install mysql!!"
else
echo "please input mysql version:"
read VERSION
echo "your mysql version is Percona-Server-$VERSION-rel31.1-566.Linux.x86_64.tar.gz"
if [ -e "$MYSQL_DIR/Percona-Server-$VERSION-rel31.1-566.Linux.x86_64.tar.gz" ]
then
echo "Please waitting"
sleep 3
/usr/sbin/groupadd mysql &&
/usr/sbin/useradd -r -g mysql mysql &&
tar zxvf $MYSQL_DIR/Percona-Server-$VERSION-rel31.1-566.Linux.x86_64.tar.gz -C $MYSQL_DIR/ &&
cd $MYSQL_DIR/Percona-Server-$VERSION-rel31.1-566.Linux.x86_64 &&
echo "PATH=$PATH:$HOME/bin:/usr/local/mysql/bin" >> /root/.bash_profile && source /root/.bash_profile
ln -s $MYSQL_DIR/Percona-Server-$VERSION-rel31.1-566.Linux.x86_64 $MYSQL_DIR/mysql &&
cd $MYSQL_DIR/mysql &&
/bin/chown -R mysql . &&
/bin/chgrp -R mysql . &&
sh /usr/local/mysql/scripts/mysql_install_db --user=mysql
/bin/chown -R root . &&
/bin/chown -R mysql data
/bin/cp $BASE_DIR/support-files/my-medium.cnf /etc/my.cnf
/bin/cp $BASE_DIR/support-files/mysql.server /etc/init.d/mysqld
/sbin/chkconfig --add mysqld
/sbin/service mysqld start
else
echo "Your input mysql version is not in $MYSQL_DIR"
fi
fi
Percona-Server-5.5.33二进制安装的更多相关文章
- ubuntu安装Percona Server
Percona Server是mysql数据库的一个衍生版本,在性能,稳定性和可管理性上都有很大的提升,目前淘宝的mysql数据库就是基于Percona Server,请原谅我这么喜欢研究淘宝的技术. ...
- percona server 二进制安装下编译tpcc-mysql的坑
出于习惯,percona server的部署都是通过二进制包自动化安装,结果遇到一个硕大无比的坑,编译TPCC-MySQL时出现警告 10:49:36 root@DB-Master:~/tpcc-my ...
- 如何在 CentOS 7 上安装 Percona Server
在这篇文章中我们将了解关于 Percona 服务器,一个开源的MySQL,MariaDB的替代品.InnoDB的数据库引擎使得Percona 服务器非常有吸引力,如果你需要的高性能,高可靠性和高性价比 ...
- Linux 下 YUM 安装 Percona Server 5.6
Percona Server 是 MySQL 的衍生版,专注于 Linux/BSD 下 MySQL 数据库服务器的改进, 在功能和性能上较 MySQL 有着显著的提升. Percona Server ...
- CentOS 7.2 安装配置 Percona Server
个人比较喜欢 MYSQL 的轻量,今天花了一点时间把阿里云上的 MYSQL5.7 换成了 Percona-Server ,Percona 是一个开源的 MySQL 衍生版.InnoDB的数据库引擎使得 ...
- Percona Server 5.6 安装TokuDB
系统:Red Hat Enterprise Linux Server release 6.3 (Santiago) 数据库:Percona-Server-5.6.29-rel76.2-Linux.x8 ...
- mysql 5.7/percona server/mariadb 10.2安装与服务器参数优化
建议使用percona server linux generic版,从https://www.percona.com/downloads/Percona-Server-LATEST/下载,现在不在推荐 ...
- CentOS 7.5 安装与配置 Percona Server 5.7
个人比较喜欢 MYSQL 的轻量,今天花了一点时间把阿里云上的 MYSQL5.7 换成了 Percona-Server .Percona 是一个开源的 MySQL 衍生版,TokuDB 的数据库引擎使 ...
- Centos7 二进制安装 Kubernetes 1.13
目录 1.目录 1.1.什么是 Kubernetes? 1.2.Kubernetes 有哪些优势? 2.环境准备 2.1.网络配置 2.2.更改 HOSTNAME 2.3.配置ssh免密码登录登录 2 ...
随机推荐
- linux shell date格式化配置
国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html内部邀请码:C8E245J (不写邀请码,没有现金送)国内私 ...
- paxos 实现
原文地址:http://rdc.taobao.com/blog/cs/?p=162 本文主要介绍zookeeper中zookeeper Server leader的选举,zookeeper在选举lea ...
- UITextView光标在中间的问题
if ([self respondsToSelector:@selector(setAutomaticallyAdjustsScrollViewInsets:)]) { self.automatica ...
- Codeforces Codeforces Round #319 (Div. 2) B. Modulo Sum 背包dp
B. Modulo Sum Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/577/problem/ ...
- windows8 认识及使用
windows8的一次技术分享. 利用国庆宅家的几天,在跑不动XP的老笔记本上装了win8,嘿,跑的溜溜的,一高兴做个ppt给公司的同事们介绍介绍,随意之作,勿较真抬杠,呵呵. 文件地址:http:/ ...
- [Practical Git] Switching between current branch and last checkout branch
When working on a project, it is much easier to work on features and bugs in isolation of the rest o ...
- [MODx] 9. Real Example
Snippet code: <?php $path = MODX_CORE_PATH . 'components/storefinder/'; $result = $modx->addPa ...
- leetcode解决问题的方法||Integer to Roman问题
problem: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range ...
- emplace_back与push_back的区别
std::vector::emplace_back C++ Containers library std::vector template< class... Args &g ...
- php转义和去掉html、php标签函数
/** * 转义html字符 * * @param string|array $var */function fhtmlspecialchars($var) { if (is_array ( $var ...