Install Mysql on Centos

Source: Internet
Author: User
Tags percona percona server

Install Mysql on Centos

Operating system information:

[Vagrant @ localhost ~] $ Uname-

Linux localhost. localdomain 2.6.32-358. el6.x86 _ 64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux


1. sudo yum install Percona-Server-shared-55-5.5.37-rel35.0.el6.x86_64.rpm

[Vagrant @ localhost download] $ sudo yum install Percona-Server-shared-55-5.5.37-rel35.0.el6.x86_64.rpm

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* Base: ftp.riken.jp

* Extras: ftp.riken.jp

* Updates: ftp.riken.jp

Setting up Install Process

Examining Percona-Server-shared-55-5.5.37-rel35.0.el6.x86_64.rpm: Percona-Server-shared-55-5.5.37-rel35.0.el6.x86_64

Marking Percona-Server-shared-55-5.5.37-rel35.0.el6.x86_64.rpm to be installed

Resolving Dependencies

--> Running transaction check

---> Package Percona-Server-shared-55.x86_64. 5.37-rel35.0.el6 will be installed

--> Processing Dependency: libcrypto. so.10 (libcrypto. so.10) (64bit) for package: Percona-Server-shared-55-5.5.37-rel35.0.el6.x86_64

--> Processing Dependency: libssl. so.10 (libssl. so.10) (64bit) for package: Percona-Server-shared-55-5.5.37-rel35.0.el6.x86_64

--> Running transaction check

---> Package openssl. x86_64. 0.0-27. el6_4.2 will be updated

--> Processing Dependency: openssl = 1.0.0-27. el6_4.2 for package: openssl-devel-1.0.0-27.el6_4.2.x86_64

---> Package openssl. x86_64 0:1. 0.1e-30. el6_6.5 will be an update

--> Running transaction check

---> Package openssl-devel.x86_64. 0.0-27. el6_4.2 will be updated

---> Package openssl-devel.x86_64. 0.1e-30. el6_6.5 will be an update

--> Finished Dependency Resolution


Dependencies Resolved


========================================================== ========================================================== ====================================

Package Arch Version Repository Size

========================================================== ========================================================== ====================================

Installing:

Percona-Server-shared-55 x86_64 5.5.37-rel35.0.el6/Percona-Server-shared-55-5.5.37-rel35.0.el6.x86_64 3.0 M

Updating for dependencies:

Openssl x86_64 1.0.1e-30. el6_6.5 updates 1.5 M

Openssl-devel x86_64 1.0.1e-30. el6_6.5 updates 1.2 M


Transaction Summary

========================================================== ========================================================== ====================================

Install 1 Package (s)

Upgrade 2 Package (s)


Total size: 5.6 M

Total download size: 2.7 M

Is this OK [y/N]: y

Downloading Packages:

(1/2): openssl-1.0.1e-30.el6_6.5.x86_64.rpm | 1.5 MB

(2/2): openssl-devel-1.0.1e-30.el6_6.5.x86_64.rpm | 1.2 MB

Bytes --------------------------------------------------------------------------------------------------------------

Total 225 kB/s | 2.7 MB

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Updating: openssl-1.0.1e-30.el6_6.5.x86_64 1/5

Installing: Percona-Server-shared-55-5.5.37-rel35.0.el6.x86_64 2/5

Updating: openssl-devel-1.0.1e-30.el6_6.5.x86_64 3/5

Cleanup: openssl-devel-1.0.0-27.el6_4.2.x86_64 4/5

Cleanup: openssl-1.0.0-27.el6_4.2.x86_64 5/5

Verifying: openssl-1.0.1e-30.el6_6.5.x86_64 1/5

Verifying: Percona-Server-shared-55-5.5.37-rel35.0.el6.x86_64 2/5

Verifying: openssl-devel-1.0.1e-30.el6_6.5.x86_64 3/5

Verifying: openssl-devel-1.0.0-27.el6_4.2.x86_64 4/5

Verifying: openssl-1.0.0-27.el6_4.2.x86_64 5/5


Installed:

Percona-Server-shared-55.x86_64. 5.37-rel35.0.el6


Dependency Updated:

Openssl. x86_64. 0.1e-30. el6_6.5 openssl-devel.x86_64. 0.1e-30. el6_6.5


Complete!


2. sudo yum install Percona-Server-devel-55-5.5.37-rel35.0.el6.x86_64.rpm

[Vagrant @ localhost download] $ sudo yum install Percona-Server-devel-55-5.5.37-rel35.0.el6.x86_64.rpm

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* Base: ftp.riken.jp

* Extras: ftp.riken.jp

* Updates: ftp.riken.jp

Setting up Install Process

Examining Percona-Server-devel-55-5.5.37-rel35.0.el6.x86_64.rpm: Percona-Server-devel-55-5.5.37-rel35.0.el6.x86_64

Marking Percona-Server-devel-55-5.5.37-rel35.0.el6.x86_64.rpm to be installed

Resolving Dependencies

--> Running transaction check

---> Package Percona-Server-devel-55.x86_64. 5.37-rel35.0.el6 will be installed

--> Finished Dependency Resolution


Dependencies Resolved


========================================================== ========================================================== ====================================

Package Arch Version Repository Size

========================================================== ========================================================== ====================================

Installing:

Percona-Server-devel-55 x86_64 5.5.37-rel35.0.el6/Percona-Server-devel-55-5.5.37-rel35.0.el6.x86_64 4.4 M


Transaction Summary

========================================================== ========================================================== ====================================

Install 1 Package (s)


Total size: 4.4 M

Installed size: 4.4 M

Is this OK [y/N]: y

Downloading Packages:

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing: Percona-Server-devel-55-5.5.37-rel35.0.el6.x86_64 1/1

Verifying: Percona-Server-devel-55-5.5.37-rel35.0.el6.x86_64 1/1


Installed:

Percona-Server-devel-55.x86_64. 5.37-rel35.0.el6



3. sudo yum install Percona-Server-client-55-5.5.37-rel35.0.el6.x86_64.rpm

[Vagrant @ localhost download] $ sudo yum install Percona-Server-client-55-5.5.37-rel35.0.el6.x86_64.rpm

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* Base: ftp.riken.jp

* Extras: ftp.riken.jp

* Updates: ftp.riken.jp

Setting up Install Process

Examining Percona-Server-client-55-5.5.37-rel35.0.el6.x86_64.rpm: Percona-Server-client-55-5.5.37-rel35.0.el6.x86_64

Marking Percona-Server-client-55-5.5.37-rel35.0.el6.x86_64.rpm to be installed

Resolving Dependencies

--> Running transaction check

---> Package Percona-Server-client-55.x86_64. 5.37-rel35.0.el6 will be installed

--> Finished Dependency Resolution


Dependencies Resolved


========================================================== ========================================================== ====================================

Package Arch Version Repository Size

========================================================== ========================================================== ====================================

Installing:

Percona-Server-client-55 x86_64 5.37-rel35.0.el6/Percona-Server-client-55-5.5.37-rel35.0.el6.x86_64 29 M


Transaction Summary

========================================================== ========================================================== ====================================

Install 1 Package (s)


Total size: 29 M

Installed size: 29 M

Is this OK [y/N]: y

Downloading Packages:

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing: Percona-Server-client-55-5.5.37-rel35.0.el6.x86_64 1/1

Verifying: Percona-Server-client-55-5.5.37-rel35.0.el6.x86_64 1/1


Installed:

Percona-Server-client-55.x86_64. 5.37-rel35.0.el6


Complete!


4. sudo yum install Percona-Server-server-55-5.5.37-rel35.0.el6.x86_64.rpm

[Vagrant @ localhost download] $ sudo yum install Percona-Server-server-55-5.5.37-rel35.0.el6.x86_64.rpm

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

* Base: ftp.riken.jp

* Extras: ftp.riken.jp

* Updates: ftp.riken.jp

Setting up Install Process

Examining Percona-Server-server-55-5.5.37-rel35.0.el6.x86_64.rpm: Percona-Server-server-55-5.5.37-rel35.0.el6.x86_64

Marking Percona-Server-server-55-5.5.37-rel35.0.el6.x86_64.rpm to be installed

Resolving Dependencies

--> Running transaction check

---> Package Percona-Server-server-55.x86_64. 5.37-rel35.0.el6 will be installed

--> Finished Dependency Resolution


Dependencies Resolved


========================================================== ========================================================== ====================================

Package Arch Version Repository Size

========================================================== ========================================================== ====================================

Installing:

Percona-Server-server-55 x86_64 5.5.37-rel35.0.el6/Percona-Server-server-55-5.5.37-rel35.0.el6.x86_64 65 M


Transaction Summary

========================================================== ========================================================== ====================================

Install 1 Package (s)


Total size: 65 M

Installed size: 65 M

Is this OK [y/N]: y

Downloading Packages:

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing: Percona-Server-server-55-5.5.37-rel35.0.el6.x86_64 1/1

Error in my_thread_global_end (): 1 threads didn't exit

Error in my_thread_global_end (): 1 threads didn't exit


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 localhost. localdomain 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

Https://bugs.launchpad.net/percona-server/+filebug


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 Percona Toolkit.

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://www.percona.com/doc/percona-server/5.5/management/udf_percona_toolkit.html for more details

Verifying: Percona-Server-server-55-5.5.37-rel35.0.el6.x86_64 1/1


Installed:

Percona-Server-server-55.x86_64. 5.37-rel35.0.el6


Complete!


5. Start mysql

[Vagrant @ localhost download] $ chkconfig -- list | grep mysql

Mysql 0: Disable 1: Disable 2: Enable 3: Enable 4: Enable 5: Enable 6: Disable

[Vagrant @ localhost download] $ sudo service mysql start

Starting MySQL (Percona Server)... SUCCESS!

[Vagrant @ localhost download] $ sudo netstat-ntlp | grep mysql

Tcp 0 0 0.0.0.0: 3306 0.0.0.0: * LISTEN 2768/mysqld

6. Create a mysql user

Non-root creation failed.

[Vagrant @ localhost ~] $ Mysql

Welcome to the MySQL monitor. Commands end with; or \ g.

Your MySQL connection id is 2

Server version: 5.5.37-35.0 Percona Server (GPL), Release rel35.0, Revision 657


Copyright (c) 2009-2014 Percona LLC and/or its affiliates

Copyright (c) 2000,201 4, 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.


Type 'help; 'or' \ H' for help. type' \ C' to clear the current input statement.


Mysql> create user dummy identified by '123456 ';

ERROR 1227 (42000): Access denied; you need (at least one of) the create user privilege (s) for this operation

The root permission is successfully created.

[Vagrant @ localhost ~] $ Sudo mysql

Welcome to the MySQL monitor. Commands end with; or \ g.

Your MySQL connection id is 3

Server version: 5.5.37-35.0 Percona Server (GPL), Release rel35.0, Revision 657


Copyright (c) 2009-2014 Percona LLC and/or its affiliates

Copyright (c) 2000,201 4, 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.


Type 'help; 'or' \ H' for help. type' \ C' to clear the current input statement.


Mysql> create user dummy identified by '123456 ';

Query OK, 0 rows affected (0.03 sec)


Mysql> grant all on *. * TO dummy;

Query OK, 0 rows affected (0.01 sec)

7. log on to mysql with a new user

[Vagrant @ localhost ~] $ Sudo mysql-udummy-p

Enter password:

ERROR 1045 (28000): Access denied for user 'dummy' @ 'localhost' (using password: YES)

Dizzy ...... New users cannot log on to the database .....

The cause is not found at the moment...

Continue to use the default root account.

Related Article

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.