安装MySQL和HandlerSocket

CentOS 6.5
MySQL 5.6.33
HandlerSocket 1.1.2

# Get packages
shell> wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.33.tar.gz
shell> wget https://github.com/DeNA/HandlerSocket-Plugin-for-MySQL/archive/1.1.2.tar.gz
shell> mv 1.1.2.tar.gz handlerSocket-1.1.2.tar.gz

## MySQL
# System Requirements
shell> sudo yum install cmake make gcc gcc-c++ perl ncurses-devel bison libtool
shell> sudo mv /etc/my.cnf /etc/my.cnf.bak (dependes)

# Preconfiguration setup
shell> sudo groupadd mysql
shell> sudo useradd -r -g mysql -s /bin/false mysql

# Beginning of source-build specific instructions
shell> tar zxvf mysql-5.6.33.tar.gz
shell> cd mysql-5.6.33
shell> cmake .
shell> make
shell> sudo make install
# End of source-build specific instructions

# Postinstallation setup
shell> cd /usr/local/mysql
shell> sudo chown -R mysql:mysql .
shell> sudo scripts/mysql_install_db --user=mysql
shell> sudo chown -R root .
shell> sudo chown -R mysql data
shell> sudo bin/mysqld_safe --user=mysql &
# Next command is optional
shell> sudo cp support-files/mysql.server /etc/init.d/mysqld

## HandlerSocket
# Build Handlersocket
shell> tar zxvf handlerSocket-1.1.2.tar.gz
shell> cd HandlerSocket-Plugin-for-MySQL-1.1.2
shell> ./autogen.sh
shell> ./configure --with-mysql-source=/home/susl/tools/mysql-5.6.33 --with-mysql-bindir=/usr/local/mysql/bin --with-mysql-plugindir=/usr/local/mysql/lib/plugin
shell> make
shell> sudo make install

# Using Handlersocket
shell> sudo sh -c "echo ‘[mysqld]
loose_handlersocket_port = 9998
loose_handlersocket_port_wr = 9999
loose_handlersocket_threads = 16
loose_handlersocket_threads_wr = 1
open_files_limit = 65535
‘ >> /usr/local/mysql/my.cnf"
# Log in to mysql as root
mysql> install plugin handlersocket soname ‘handlersocket.so‘;

----------
附:二进制包/源码安装方式的MySQL卸载
1.关闭MySQL服务进程
shell> sudo service mysqld stop
2.查找MySQL的安装目录并彻底删除
#系统自带的mysql-libs包不要卸载,对应目录不要删掉:/usr/share/mysql, /usr/lib64/mysql
shell> sudo find / -name mysql
shell> sudo rm -rf xxx ...
3.视情况删除配置文件my.cnf
4.视情况删除MySQL用户以及用户组

时间: 2024-10-29 04:15:08

安装MySQL和HandlerSocket的相关文章

centos7下使用yum安装mysql

CentOS7的yum源中默认好像是没有mysql的.为了解决这个问题,我们要先下载mysql的repo源. 1. 下载mysql的repo源 $ wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm 2. 安装mysql-community-release-el7-5.noarch.rpm包 $ sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm 安装这个

centos6.8 yum安装mysql 5.6

一.检查系统是否安装其他版本的MYSQL数据 yum list installed | grep mysql yum -y remove mysql-libs.x86_64 二.安装及配置 wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm rpm -ivh mysql-community-release-el6-5.noarch.rpm yum repolist all | grep mysql 安装MYSQL

centos7 用yum安装mysql(转)

CentOS 7的yum源中貌似没有正常安装mysql时的mysql-sever文件,需要去官网上下载 # wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm # rpm -ivh mysql-community-release-el7-5.noarch.rpm # yum install mysql-community-server 成功安装之后重启mysql服务 # service mysqld res

Ubuntu安装MySQL

看着别人说千遍万遍,不如自己实际操作一遍,以下是本人第一次安装MySQL之后总结出来的,走了许多的坑,欢迎评论 一.Ubuntu服务器安装MySQL1.升级apt-get:apt-get update 更新软件源中的所有软件列表 2.查看MySQL源:apt-cache search mysql-server 3.安装mysql:$sudo apt-get install mysql-serverPS:这步之后需要输入用户名和密码,要记住$sudo apt-get install libmysq

安装mysql时,提示This application requires .NET framework 4.0问题

Question:双击MySQL的安装文件, 弹框提示, Answer:安装微软的 .NET Framework 4或更新的版本,下载地址:https://www.microsoft.com/zh-cn/Search/result.aspx?q=.net+framework&x=0&y=0 安装完成后安装MySQL即可.

自动安装MySQL脚本

在Linux 上安装MySQL单实例SHELL脚本 在CentOS 6.5环境测试通过 #!/bin/bash user=mysql group=mysql port=3306 basedir=/usr/local/mysql datadir=/data/mysql/mysql_${port}/data sourcefile=$1 mysqlprofile=/etc/my.cnf logfile=/tmp/mysqlinstall.log nowtime=`date '+%Y-%m-%d %H:

CentOS 7.2 yum方式安装MySQL 5.7

CentOS 7之后的版本yum的默认源中使用MariaDB替代原先MySQL,因此安装方式较为以往有一些改变: 下载mysql的源 wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm 安装yum库 yum localinstall -y mysql57-community-release-el7-7.noarch.rpm 安装MySQL yum install -y mysql-community-s

安装mysql

一:安装mysql 1.在web服务器上安装mysql: yum -y remove mysql mysql-server ##卸载mysql的rpm包 mount /dev/cdrom /mnt yum -y install ncurses-* lftp ftp.linuxfan.cn ##下载mysql和cmake lftp ftp.linuxfan.cn:/tools> get cmake-2.8.6.tar.gz mysql-5.5.22.tar.gz 2.解压cmake,安装基础环境

CentOS6.5下安装MySQL

方法有点笨,但是,没有找到好一点的办法,就这样先装着,看朋友们是否也有需要,记录一下 CentOS 下安装MySQL5.7的时候出现各种问题,各种报错,试过无数办法,今天终于安装上去,特此记录一下. (1) 首先,下载一个wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm安装最新的MySQL的yum源,并安装上去 (2) 由于yum源是下载最新的安装包,所以,当你下载安装好yum源之后,就可以进行安装最新的MySQL了,