How to Install and configure MySQL 5.6 on CentOS
Oracle today declared the general accessibility of MySQL 5.6, the world’s most prevalent open-source database.
Step 1: Install the MySQL database:
First we have to install mysql communitty repository and after that install mysql-server using yum command. Use following steps to install MySQL 5.6.
# rpm -Uvh http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm # yum -y install mysql-server
Step 2: Start MySQL.
After installing mysql packages need to start service of mysql using following command.
service mysqld start
Step 3: Start on Boot:
Run following command to start mysql service on boot:
# chkconfig mysqld on
Step 4: Set a secret word for the root client and set other security-related choices. Enter the following command and take after the prompts on your screen to finish the configuration.
# mysql_secure_installation
Step 5: Verify Version:
Verify the MySQL server version using following command.
# mysql -V
Sample Output:
mysql Ver 14.14 Distrib 5.6.23, for Linux (x86_64) using EditLine wrapper
Step 6: Login MySQL:
Use following command to login in MySQL.
# mysql -u root -p
Messages similar to the following display:
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 15 Server version: 5.6.23 MySQL Community Server (GPL) Copyright (c) 2000, 2015, 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.