How to Install MySQL 5.5 Database on CentOS 6.2 using Remi Repository

The Remi Repository, also known as Les RPM de Remi repository, is a renowned third-party repository for CentOS. It is highly regarded for providing and maintaining the latest versions of MySQL and PHP. When you need the most recent version of the Linux Apache MySQL and PHP (LAMP) server, the Remi repository can be an invaluable resource.

This tutorial will guide you through the process of installing MySQL 5.5 database on CentOS 6.2 using the Remi repository. Before we start, make sure you have installed the Remi yum Repository on CentOS 6.2 x86 and x86_64.

Installation of MySQL Server Packages

The first step in the installation process is to install the latest MySQL Server packages. To do this, run the following command:

yum install mysql mysql-server -y

This command will initiate the installation process, resolving dependencies, and running a transaction check. It will install the MySQL package and the MySQL server package. During this process, the system will also install the necessary dependencies, such as libaio and mysql-libs.

[root@centos62 ~]# yum install mysql mysql-server -y
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * base: centos.ipserverone.com
 * extras: centos.ipserverone.com
 * remi: rpms.famillecollet.com
 * remi-test: rpms.famillecollet.com
 * updates: centos.ipserverone.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.i686 0:5.5.25-1.el6.remi will be installed
--> Processing Dependency: mysql-libs(x86-32) = 5.5.25-1.el6.remi for package: mysql-5.5.25-1.el6.remi.i686
---> Package mysql-server.i686 0:5.5.25-1.el6.remi will be installed
--> Processing Dependency: libaio.so.1(LIBAIO_0.4) for package: mysql-server-5.5.25-1.el6.remi.i686
--> Processing Dependency: libaio.so.1(LIBAIO_0.1) for package: mysql-server-5.5.25-1.el6.remi.i686
--> Processing Dependency: libaio.so.1 for package: mysql-server-5.5.25-1.el6.remi.i686
--> Running transaction check
---> Package libaio.i686 0:0.3.107-10.el6 will be installed
---> Package mysql-libs.i686 0:5.5.25-1.el6.remi will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                   Arch              Version                        Repository         Size
====================================================================================================
Installing:
 mysql                     i686              5.5.25-1.el6.remi              remi              5.8 M
 mysql-server              i686              5.5.25-1.el6.remi              remi               10 M
Installing for dependencies:
 libaio                    i686              0.3.107-10.el6                 base               21 k
 mysql-libs                i686              5.5.25-1.el6.remi              remi              771 k

Transaction Summary
====================================================================================================
Install       4 Package(s)

Total download size: 17 M
Installed size: 77 M
Downloading Packages:
(1/4): libaio-0.3.107-10.el6.i686.rpm                                        |  21 kB     00:00
(2/4): mysql-5.5.25-1.el6.remi.i686.rpm                                      | 5.8 MB     12:36
(3/4): mysql-libs-5.5.25-1.el6.remi.i686.rpm                                 | 771 kB     01:35
(4/4): mysql-server-5.5.25-1.el6.remi.i686.rpm                               |  10 MB     21:41
----------------------------------------------------------------------------------------------------
Total                                                               8.0 kB/s |  17 MB     35:56
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : mysql-libs-5.5.25-1.el6.remi.i686                                                1/4

WARNING : This MySQL RPM is not an official Fedora/Redhat build and it
overrides the official one. Don't file bugs on Fedora Project nor Redhat.
Use dedicated forums http://forums.famillecollet.com/

  Installing : mysql-5.5.25-1.el6.remi.i686                                                     2/4
  Installing : libaio-0.3.107-10.el6.i686                                                       3/4
  Installing : mysql-server-5.5.25-1.el6.remi.i686                                              4/4

Installed:
  mysql.i686 0:5.5.25-1.el6.remi                mysql-server.i686 0:5.5.25-1.el6.remi

Dependency Installed:
  libaio.i686 0:0.3.107-10.el6                  mysql-libs.i686 0:5.5.25-1.el6.remi

Complete!

Starting the MySQL Daemon Service

Once the installation is complete, the next step is to start the MySQL daemon service. Run the following command to do this:

service mysqld start

You should see a message indicating that the process has started successfully.

[root@centos62 ~]# service mysqld start
Starting mysqld:                                           [  OK  ]

Logging into the Database

After starting the MySQL daemon service, you can log into the database using the following command:

mysql -u root -p

You will be prompted to enter your password. After successful login, you will be welcomed to the MySQL monitor.

[root@centos62 ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.25 MySQL Community Server (GPL) by Remi

Copyright (c) 2000, 2011, 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> exit

Checking Installed MySQL Related Packages

To verify the installation, you can check the existing MySQL installed related packages by running the following command:

rpm -qa | grep mysql

This command will list all the installed MySQL related packages.

[root@centos62 ~]# rpm -qa | grep mysql
compat-mysql51-5.1.54-1.el6.remi.i686
mysql-libs-5.5.25-1.el6.remi.i686
mysql-5.5.25-1.el6.remi.i686
mysql-server-5.5.25-1.el6.remi.i686

Checking MySQL Version

Finally, you can check the version of MySQL installed on your system by running the following command:

mysql -V

This command will display the version of MySQL installed on your system.

[root@centos62 ~]# mysql -V
mysql  Ver 14.14 Distrib 5.5.25, for Linux (i686) using readline 5.1
[root@centos62 ~]#

Commands Mentioned

  • yum install mysql mysql-server -y – Installs the MySQL server packages.
  • service mysqld start – Starts the MySQL daemon service.
  • mysql -u root -p – Logs into the MySQL database.
  • rpm -qa | grep mysql – Checks the installed MySQL related packages.
  • mysql -V – Checks the version of MySQL installed.
See also  Setup vsftpd Service on CentOS 6.5

Conclusion

In conclusion, the Remi Repository is a valuable resource for CentOS users, providing and maintaining the latest versions of MySQL and PHP. This tutorial has guided you through the process of installing MySQL 5.5 on CentOS 6.2 using the Remi repository, from installing the MySQL Server packages to checking the version of MySQL installed on your system. By following these steps, you can ensure that you have the latest version of MySQL installed on your system, allowing you to take full advantage of the features and benefits that MySQL has to offer. Whether you’re running a VPS server or a cloud hosting service, understanding how to install and manage MySQL is a crucial skill for any webmaster or website administrator.

See also  How to Remove a Logical Volume on CentOS 6.3/RHEL6

FAQ

  1. What is the Remi Repository?

    The Remi Repository, also known as Les RPM de Remi repository, is a third-party repository for CentOS. It provides and maintains thelatest versions of MySQL and PHP, making it a valuable resource when you need the most recent version of the Linux Apache MySQL and PHP (LAMP) server.

  2. How do I install MySQL Server packages?

    You can install the MySQL Server packages by running the command ‘yum install mysql mysql-server -y’. This command will initiate the installation process, resolving dependencies, and running a transaction check.

  3. How do I start the MySQL daemon service?

    You can start the MySQL daemon service by running the command ‘service mysqld start’. You should see a message indicating that the process has started successfully.

  4. How do I log into the MySQL database?

    You can log into the MySQL database by running the command ‘mysql -u root -p’. You will be prompted to enter your password. After successful login, you will be welcomed to the MySQL monitor.

  5. How do I check the version of MySQL installed on my system?

    You can check the version of MySQL installed on your system by running the command ‘mysql -V’. This command will display the version of MySQL installed on your system.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *