First, download
http://www.percona.com/downloads/Percona-Server-5.5/
percona-server-5.5.33-31.1
Select binary
Select Linux
Select x86_64
Second, the document:
http://www.percona.com/doc/percona-server/5.5/
Http://dev.mysql.com/doc/refman/5.5/en/binary-installation.html--Main reference this document
Third, installation
[Email protected] ~]# MV percona-server-5.5.33-rel31.1-566.linux.x86_64.tar.gz/usr/local/
Install the true path to put
[[email protected] ~]# Groupadd MySQL
[[email protected] ~]# useradd–r–g MySQL MySQL
[Email protected] ~]# MV percona-server-5.5.33-rel31.1-566.linux.x86_64.tar.gz/usr/local/
[Email protected] ~]# cd/usr/local
[Email protected] ~]# tar zxvf percona-server-5.5.33-rel31.1-566.linux.x86_64.tar.gz
[email protected] local]# LL
Total 63104
Drwxr-xr-x 2 root root 4096 Apr 5 01:34 Bin
Drwxr-xr-x 2 root root 4096 Oct 1 etc
Drwxr-xr-x 2 root root 4096 Oct 1 games
Drwxr-xr-x 2 root root 4096 Oct 1 include
Drwxr-xr-x 2 root root 4096 Oct 1 lib
Drwxr-xr-x 2 root root 4096 Oct 1 lib64
Drwxr-xr-x 2 root root 4096 Oct 1 libexec
Drwxr-xr-x root root 4096 percona-server-5.5.33-rel31.1-566.linux.x86_64
-rw-r--r--1 root root 64459501 June 12:44 percona-server-5.5.33-rel31.1-566.linux.x86_64.tar.gz
Drwxr-xr-x 2 root root 4096 Oct 1 sbin
Drwxr-xr-x 4 root root 4096 APR 4 23:39 Share
Drwxr-xr-x 2 root root 4096 Oct 1 src
[[email protected] local]# ln-s/usr/local/percona-server-5.5.33-rel31.1-566.linux.x86_64 MySQL
[email protected] local]# LL
Total 63104
Drwxr-xr-x 2 root root 4096 Apr 5 01:34 Bin
Drwxr-xr-x 2 root root 4096 Oct 1 etc
Drwxr-xr-x 2 root root 4096 Oct 1 games
Drwxr-xr-x 2 root root 4096 Oct 1 include
Drwxr-xr-x 2 root root 4096 Oct 1 lib
Drwxr-xr-x 2 root root 4096 Oct 1 lib64
Drwxr-xr-x 2 root root 4096 Oct 1 libexec
lrwxrwxrwx 1 root root in June 12:55 MySQL--/usr/local/percona-server-5.5.33-rel31.1-566.linux.x86_64
Drwxr-xr-x root root 4096 percona-server-5.5.33-rel31.1-566.linux.x86_64
-rw-r--r--1 root root 64459501 June 12:44 percona-server-5.5.33-rel31.1-566.linux.x86_64.tar.gz
Drwxr-xr-x 2 root root 4096 Oct 1 sbin
Drwxr-xr-x 4 root root 4096 APR 4 23:39 Share
Drwxr-xr-x 2 root root 4096 Oct 1 src
[Email protected] local]# CD mysql/
[[email protected] mysql]# chown-r MySQL.
[[email protected] mysql]# chgrp-r MySQL.
[email protected] mysql]# LL
Total 80
Drwxr-xr-x 2 MySQL mysql 4096 the bin
-rw-r--r--1 mysql MySQL 17987 COPYING
-rw-r--r--1 MySQL MySQL 1703 copying-jemalloc
Drwxr-xr-x 3 mysql mysql 4096 data
Drwxr-xr-x 2 mysql mysql 4096 docs
Drwxr-xr-x 4 mysql mysql 4096 include
-rw-r--r--1 mysql MySQL 301 install-binary
Drwxr-xr-x 3 MySQL MySQL 4096 Lib
Drwxr-xr-x 4 MySQL mysql 4096
Drwxr-xr-x 3 MySQL mysql 4096
drwxr-xr-x MySQL mysql 4096 mysql-test
-rw-r--r--1 mysql MySQL 2496 README
Drwxr-xr-x 2 mysql mysql 4096 scripts
drwxr-xr-x MySQL mysql 4096 share
Drwxr-xr-x 4 mysql mysql 4096 sql-bench
Drwxr-xr-x 3 mysql mysql 4096 support-files
[Email protected] mysql]#/scripts/mysql_install_db--user=mysql
Installing MySQL system tables ...
Ok
Filling Help Tables ...
Ok
To start mysqld at boot time with to copy
Support-files/mysql.server to the right place for your system
REMEMBER to SET A PASSWORD for the MySQL root USER!
To does so, start the server, then issue the following commands:
./bin/mysqladmin-u root password ' new-password '
./bin/mysqladmin-u root-h tthost3 password ' new-password '
Alternatively you can run:
./bin/mysql_secure_installation
Which would also give you the option of removing the test
Databases and anonymous user created by default. This is
Strongly recommended for production servers.
See the Manual for more instructions.
You can start the MySQL daemon with:
Cd. ;./bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
CD./mysql-test; Perl mysql-test-run.pl
Problems with the./bin/mysqlbug script!
Percona recommends, all production deployments is protected with a support
Contract (http://www.percona.com/mysql-suppport/) to ensure the highest uptime,
be eligible for hot fixes, and boost your team ' s productivity.
There are a few points above is very important!
[Email protected] mysql]# chown-r root.
[email protected] mysql]# LL
Total 80
Drwxr-xr-x 2 root MySQL 4096
-rw-r--r--1 root MySQL 17987 COPYING
-rw-r--r--1 root MySQL 1703 Copying-jemalloc
Drwxr-xr-x 5 root MySQL 4096 June 12:59 data
Drwxr-xr-x 2 root MySQL 4096 docs
Drwxr-xr-x 4 root MySQL 4096 include
-rw-r--r--1 root MySQL 301 install-binary
Drwxr-xr-x 3 root MySQL 4096
Drwxr-xr-x 4 root MySQL 4096
Drwxr-xr-x 3 root MySQL 4096
Drwxr-xr-x root MySQL 4096 mysql-test
-rw-r--r--1 root MySQL 2496 README
Drwxr-xr-x 2 root mysql 4096 scripts
Drwxr-xr-x root mysql 4096 share
Drwxr-xr-x 4 root MySQL 4096 sql-bench
Drwxr-xr-x 3 root mysql 4096 support-files
[[email protected] mysql]# chown-r mysql data
[email protected] mysql]# LL
Total 80
Drwxr-xr-x 2 root MySQL 4096
-rw-r--r--1 root MySQL 17987 COPYING
-rw-r--r--1 root MySQL 1703 Copying-jemalloc
Drwxr-xr-x 5 mysql mysql 4096 June 12:59 data
The following are optional:
[email protected] mysql]# CP support-files/my-medium.cnf/etc/my.cnf
[Email protected] mysql]#/bin/mysqld_safe--user=mysql &
[1] 3813
[Email protected] mysql]# 140630 13:07:39 mysqld_safe Logging to '/usr/local/mysql/data/tthost3.err '.
140630 13:07:39 Mysqld_safe starting mysqld daemon with databases From/usr/local/mysql/data
[Email protected] mysql]# Ps-ef | grep MySQL
Root 3813 3607 0 13:07 pts/2 00:00:00/bin/sh./bin/mysqld_safe--user=mysql
MySQL 4067 3813 2 13:07 pts/2 00:00:00/usr/local/mysql/bin/mysqld--basedir=/usr/local/mysql--datadir=/usr/loca L/mysql/data--plugin-dir=/usr/local/mysql/lib/mysql/plugin--user=mysql--log-error=/usr/local/mysql/data/ Tthost3.err--pid-file=/usr/local/mysql/data/tthost3.pid--socket=/tmp/mysql.sock--port=3306
Root 4088 3607 0 13:07 pts/2 00:00:00 grep mysql
The following options are optional:
Edit Mysql.server
Replace the percona-server-5.5.33-rel31.1-566.linux.x86_64 with the true MySQL path
[Email protected] mysql]# VI support-files/mysql.server
Before modification:
Mysqld_pid_file_path=
If Test-z "$basedir"
Then
Basedir=/usr/local/percona-server-5.5.33-rel31.1-566.linux.x86_64
Bindir=/usr/local/percona-server-5.5.33-rel31.1-566.linux.x86_64/bin
If Test-z "$datadir"
Then
Datadir=/usr/local/percona-server-5.5.33-rel31.1-566.linux.x86_64/data
Fi
Sbindir=/usr/local/percona-server-5.5.33-rel31.1-566.linux.x86_64/bin
Libexecdir=/usr/local/percona-server-5.5.33-rel31.1-566.linux.x86_64/bin
Else
After modification:
Mysqld_pid_file_path=
If Test-z "$basedir"
Then
Basedir=/usr/local/mysql
Bindir=/usr/local/mysql/bin
If Test-z "$datadir"
Then
Datadir=/usr/local/mysql/data
Fi
Sbindir=/usr/local/mysql/bin
Libexecdir=/usr/local/mysql/bin
Else
[email protected] mysql]# CP support-files/mysql.server/etc/init.d/mysqld
[Email protected] mysql]# chkconfig--add mysqld
[Email protected] mysql]# chkconfig--list |grep mysqld
Mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[Email protected] mysql]#
[[Email protected] mysql]# service mysqld stop
Shutting down MySQL (Percona Server): 140630 13:17:40 mysqld_safe mysqld from PID File/usr/local/mysql/data/tthost3.pid ended
[OK]
[1]+ done./bin/mysqld_safe--user=mysql
[Email protected] mysql]# Ps-ef | grep MySQL
Root 4194 3607 0 13:18 pts/2 00:00:00 grep mysql
[[Email protected] mysql]# service mysqld start
Starting MySQL (Percona Server). [OK]
[Email protected] mysql]# Ps-ef | grep MySQL
Root 4206 1 0 13:18 pts/2 00:00:00/bin/sh/usr/local/mysql/bin/mysqld_safe--datadir=/usr/local/mysql/data- -pid-file=/usr/local/mysql/data/tthost3.pid
MySQL 4471 4206 1 13:18 pts/2 00:00:00/usr/local/mysql/bin/mysqld--basedir=/usr/local/mysql--datadir=/usr/loca L/mysql/data--plugin-dir=/usr/local/mysql/lib/mysql/plugin--user=mysql--log-error=/usr/local/mysql/data/ Tthost3.err--pid-file=/usr/local/mysql/data/tthost3.pid--socket=/tmp/mysql.sock--port=3306
Root 4496 3607 0 13:18 pts/2 00:00:00 grep mysql
Installation is complete!
There is another place to note that our actual installation path is:
/usr/local/percona-server-5.5.33-rel31.1-566.linux.x86_64
/usr/local/mysql just made a soft link
In the startup script, Basedir,datadir is the default in the Mysqld,mysqld_safe,mysql.server script
The/usr/local/percona-server-5.5.33-rel31.1-566.linux.x86_64 directory, which means that the script can be started directly, because the Percona default recommendation is installed under this:
/usr/local/percona-server-5.5.33-rel31.1-566.linux.x86_64
Here is just a soft link mysql and Oracle MySQL compatible under the directory only, if you want to copy the Mysql.server to the/etc/init.d/directory, the directory path in the script is not necessarily modified, how to start:
Service mysqld Start
percona-server-5.5.33-31.1 Installation