系统ubuntu10.04
下载5.5.13 mysql
http://dev.mysql.com/downloads/mirror.php?id=402746注意是源码
apt-get install cmake安装cmake编译mysql时使用,从5.5开始使用
apt-get installbison安装bison同样mysql使用
apt-get installlibncurses5-dev同样mysql使用
解压缩mysql,命令行进入mysql目录
执行cmake . make完成mysql编译
执行make install安装mysql
安装完成执行如下命令
groupadd mysql
useradd -r -g mysql mysql
cd /usr/local/mysql
chown -R mysql:mysql .
chgrp -R mysql .
.scripts/mysql_install_db --user=mysql
cp support-files/my-medium.cnf /etc/my.cnf
bin/mysqld_safe --user=mysql &
cp support-files/mysql.server /etc/init.d/mysql.server
测试mysql安装
bin/mysqladmin version
./mysqladmin Ver 8.42 Distrib 5.5.13, for Linux on i686
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Server version 5.5.13-log
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 6 min 48 sec
Threads: 1 Questions: 1 Slow queries: 0 Opens: 33 Flush tables: 1 Open tables: 26 Queries per second avg: 0.2
mysql>
set password for 'root'@'localhost'=password('root'); ##修改root密码
安装HandlerSocket Plugin:
下载handlersocket mysql plugin
https://github.com/ahiguti/HandlerSocket-Plugin-for-MySQL/
解压进入目录
./autogen.sh
./configure --with-mysql-source=mysql源码目录 --with-mysql-bindir=mysql安装目录/bin --with-mysql-plugindir=mysql安装目录/lib/plugin
make
make install完成安装
重新进入mysql命令行
install plugin handlersocket soname 'handlersocket.so'; 安装handlersocket插件
show plugins;
mysql> show plugins;
+-----------------------+--------+--------------------+------------------+---------+
| Name | Status | Type | Library | License |
+-----------------------+--------+--------------------+------------------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| mysql_native_password | ACTIVE | AUTHENTICATION | NULL | GPL |
| mysql_old_password | ACTIVE | AUTHENTICATION | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| PERFORMANCE_SCHEMA | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |
| INNODB_TRX | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_LOCKS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_LOCK_WAITS | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMP | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMP_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMPMEM | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL |
| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |
| handlersocket | ACTIVE | DAEMON | handlersocket.so | BSD |
+-----------------------+--------+--------------------+------------------+---------+
18 rows in set (0.00 sec)