Install mysql derivative release PerconaServer using YUM in Centos

Source: Internet
Author: User
Tags percona percona server
??? Preface for more information about MySQL derivative PerconaServer, please search ~ The prospects for the most open-source software under the control of Oracle are worrying ~ How many mysql derivative versions can be used? Percona is used as the production database of oschina. I'm not afraid! Haha! Definitely! Because I

? ?? Preface for more information about MySQL derivative Percona Server, please search ~ The prospects for the most open-source software under the control of Oracle are worrying ~ How many mysql derivative versions can be used? Percona is used as the production database of oschina. I'm not afraid! Haha! Definitely! Because I

? ?? Preface

For more information about MySQL derivative Percona Server, please search ~ The prospects for the most open-source software under the control of Oracle are worrying ~ How many mysql derivative versions can be used? Percona is used as the production database of oschina. I'm not afraid! Haha! Definitely! Because I started to use a vps environment with a small memory (familiar with the production line), so the centos6 system is a 32-bit drop, so 64-bit, centos5, and so on, just like doing it ~

Right? Percona Server? Is it different from mysql. You don't have to worry about it. The configuration is the same if you use mysql.

? ? Install

I understand the advantages and disadvantages of compiling and installing with source code and installing with rpm. If you need to perform secondary development, modification, and customization, you should select Source code compilation and installation. If you just use it, you can directly use yum for cool. Do you need to manually install rpm one by one? OK.

If you are a 32-bit

[Root @ s1 ~] # Rpm-Uhv? Http://www.percona.com/redir/downloads/percona-release/percona-release-0.0-1.i386.rpm

If you are a 64-bit

[Root @ s1 ~] # Rpm-Uhv? Http://www.percona.com/redir/downloads/percona-release/percona-release-0.0-1.x86_64.rpm

Check

[Root @ s1 ~] # Yum list | grep percona

Percona-release.i386 0.0-1 installed

Percona-SQL-50-debuginfo.i686 5.0.92-b23.88.rhel6 percona

Percona-SQL-client-50.i686 5.0.92-b23.88.rhel6 percona

Percona-SQL-devel-50.i686 5.0.92-b23.88.rhel6 percona

Percona-SQL-server-50.i686 5.0.92-b23.88.rhel6 percona

Percona-SQL-shared-50.i686 5.0.92-b23.88.rhel6 percona

Percona-SQL-shared-compat.i686 5.0.92-b23.85.rhel6 percona

Percona-SQL-test-50.i686 5.0.92-b23.88.rhel6 percona

The Percona-Server-51-debuginfo.i686 5.1.66-rel14.2.501.rhel6 percona

Percona-Server-55-debuginfo.i686 5.5.28-rel29.3.388.rhel6 percona.

The Percona-Server-client-51.i686 5.1.66-rel14.2.501.rhel6 percona

Percona-Server-client-55.i686 5.5.28-rel29.3.388.rhel6 percona.

The Percona-Server-devel-51.i686 5.1.66-rel14.2.501.rhel6 percona

Percona-Server-devel-55.i686 5.5.28-rel29.3.388.rhel6 percona.

The Percona-Server-server-51.i686 5.1.66-rel14.2.501.rhel6 percona

Percona-Server-server-55.i686 5.5.28-rel29.3.388.rhel6 percona.

The Percona-Server-shared-51.i686 5.1.66-rel14.2.501.rhel6 percona

Percona-Server-shared-55.i686 5.5.28-rel29.3.388.rhel6 percona.

Percona-Server-shared-compat.i686 5.5.28-rel29.3.388.rhel6 percona.

The Percona-Server-test-51.i686 5.1.66-rel14.2.501.rhel6 percona

Percona-Server-test-55.i686 5.5.28-rel29.3.388.rhel6 percona.

Percona-XtraDB-Cluster-client.i686. 5.28-23.7.20..rhel6 percona

Percona-XtraDB-Cluster-debuginfo.i686. 5.28-23.7.20..rhel6 percona

Percona-XtraDB-Cluster-devel.i686. 5.28-23.7.20..rhel6 percona

Percona-XtraDB-Cluster-galera.i686 2.0-1.117.rhel6 percona

2.0-1.117.rhel6 percona

Percona-XtraDB-Cluster-server.i686. 5.28-23.7.20..rhel6 percona

Percona-XtraDB-Cluster-shared.i686. 5.28-23.7.20..rhel6 percona

Percona-XtraDB-Cluster-test.i686. 5.28-23.7.20..rhel6 percona

Percona-playback.i686 0.5-2. el6 percona

Percona-playback-debuginfo.i686 0.5-2. el6 percona

Percona-playback-devel.i686 0.5-2. el6 percona

Percona percona-toolkit.noarch 2.1.8-1

Percona-xtrabackup.i686 2.0.4-484. rhel6 percona

Percona-xtrabackup-debuginfo.i686 2.0.4-484. rhel6 percona

Percona-xtrabackup-test.i686 2.0.4-484. rhel6 percona

[Root @ s1 ~] #

This is successful. Start yum. There are a lot of things in it, and there are also backup tools or something. There are also different versions. Select the required package.

The Percona-Server-shared-compat package must be installed here. Otherwise, an error will be reported.

Running Transaction Test

Transaction Check Error:

File/usr/lib/libmysqlclient. so conflicts between attempted installof Percona-Server-shared-51-5.1.66-rel14.2.501.rhel6.i686 and Percona-Server-shared-55-5.5.28-rel29.3.388.rhel6.i686

File/usr/lib/libmysqlclient_r.so conflicts between attempted installof Percona-Server-shared-51-5.1.66-rel14.2.501.rhel6.i686 and Percona-Server-shared-55-5.5.28-rel29.3.388.rhel6.i686

Error Summary

-----

? ?? Packages required by yum

[Root @ s1 ~] #? Yum install Percona-Server-shared-compat Percona-Server-client-55 Percona-Server-server-55 Percona-Server-shared-55? Percona-xtrabackup *

Please remember to set a password for the MySQL root USER!

To do so, start the server, then issue the following commands:

/Usr/bin/mysqladmin-u root password 'new-password'

/Usr/bin/mysqladmin-u root-h s1.us.iamle.com password 'new-password'

Alternatively you can run:

/Usr/bin/mysql_secure_installation

Which will also give you the option of removing the test

Databases and anonymous user created by default. This is

Stronugly recommended for production servers.

See the manual for more instructions.

Please report any problems with the/usr/bin/mysqlbug script!

Percona recommends that all production deployments be 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 productiinstances.

Percona Server is distributed with several useful UDF (User Defined Function) from Maatkit.

Run the following commands to create these functions:

Mysql-e "create function fnv1a_64 returns integer soname 'libnv1a _ udf. so '"

Mysql-e "create function fnv_64 returns integer soname 'libfnv _ udf. so '"

Mysql-e "create function murmur_hash returns integer soname 'libmurmur _ udf. so '"

See http://code.google.com/p/maatkit/source/browse/trunk/udf for more details

Installing: Percona-Server-shared-compat-5.5.28-rel29.3.388.rhel6.i686 6/6

Verifying: Percona-Server-server-55-5.5.28-rel29.3.388.rhel6.i686 1/6

Verifying: Percona-Server-shared-compat-5.5.28-rel29.3.388.rhel6.i686 2/6

Verifying: percona-xtrabackup-test-2.0.4-484.rhel6.i686 3/6

Verifying: Percona-Server-shared-55-5.5.28-rel29.3.388.rhel6.i686 4/6

Verifying: percona-xtrabackup-2.0.4-484.rhel6.i686 5/6

Verifying: Percona-Server-client-55-5.5.28-rel29.3.388.rhel6.i686 6/6

Installed:

Percona-Server-client-55.i686. 5.28-rel29.3.388.rhel6

Percona-Server-server-55.i686. 5.28-rel29.3.388.rhel6

Percona-Server-shared-55.i686. 5.28-rel29.3.388.rhel6

Percona-Server-shared-compat.i686. 5.28-rel29.3.388.rhel6

Percona-xtrabackup.i686 0: 2. 0.4-484. rhel6

Percona-xtrabackup-test.i686 0: 2. 0.4-484. rhel6

Complete!

It is successful now.

Start

/Etc/init. d/mysql start

The initial root password is blank. Execute mysql_secure_installation to initialize the root operation ·

Mysql_secure_installation

Set root Password

/Usr/bin/mysqladmin-u root password 'new-password'

Or

/Usr/bin/mysqladmin-u root-h s1.us.iamle.com password 'new-password'

Set msyql security and remove remote logon. The password is the password you just set.

/Usr/bin/mysql_secure_installation

? ? ? Percona (mysql) configuration file? ? ? My. cnf

You can use the percona official website to generate the percona (mysql) configuration file my. cnf? Https://tools.percona.com /?. Highly recommended, simple, fast, and reliable. Percona's rpm package installed through yum does not have the my. cnf file by default in/etc/my. cnf. Add vi/etc/my. cnf to the generated configuration. Default database path:/var/lib/mysql /.

Ps: If you change the/var/lib/mysql/path in the configuration file, use mv. Wrong data directory cannot be started.

An error is reported.

[Root @ s1 mysql] #/etc/init. d/mysql start

Starting MySQL (Percona Server )... ERROR! The server quit without updating PID file (/home/mysql/data // s1.us.iamle.com. pid ).

? ?? Default Character Set

The default Character Set of Binary-installed percona is latin1. Here we need utf8. The configuration file produced on the percona official website does not specify the character set. You need to manually configure it to the my. cnf file.

# CLIENT #
# Modify the default character encoding format of the client to utf8
Default-character-set = utf8

# GENERAL #
# Modify the default character encoding format of the server to utf8

Character_set_server = utf8

# Check the current character set in the query after restarting mysql ~

Show variables like 'character % ';

Show variables like 'collation % ';

# View all character sets

Show character set;

If all of the above are done, the database is also set to utf8, but it will still be garbled.

Add the following directly at the beginning of the SQL file:
Set names 'utf8 ′;

It is equivalent to the following three commands:
SET character_set_client = utf8;
SET character_set_results = utf8;
SET character_set_connection = utf8;

? ?? Start percona (mysql)

Like mysql, stopping and restarting is also the same.

Service mysql start

Or

/Etc/init. d/mysql start

? ?? Additional reading

Use Yum to install Percona Server

Percona Server enables the HandlerSocket plug-in

Is oschina using mysql or Percona? What storage engine?

Percona?Yum? Repository? Original official website

Building mysql 5.5.8 with default charset

In Linux, MySQL 5.5 modifies the character set encoding to UTF8 (completely solves Chinese garbled characters)

Zemanta

Original article address: Centos uses YUM to install the mysql derivative release Percona Server. Thank you for sharing it with me.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.