To install the MySQL server 5.6,follow the given below steps.
Step 1: Login into the Server and download the yum repo rpm package.
(URL: http://dev.mysql.com/downloads/repo/)
Step 5: Because the MySQL server is just installed it has blank mysql root password. To reset the mysql root password.
You can use the given below command, and follow the instruction
mysql_secure_installation
You can also use the given below alternate method
Login into mysql server. Because it is freshly installed hence root password is blank
mysql -u root
After login you will get mysql propmt. Run the given commands (remove mysql> if you are doing copy paste these commands)
mysql> use mysql;
mysql> update user set password=PASSWORD("GIVE-NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit
From souce code
# Preconfiguration setup
shell> groupadd mysql
shell> useradd -r -g mysql mysql
# Beginning of source-build specific instructions
shell> tar zxvf mysql-VERSION.tar.gz
shell> cd mysql-VERSION
shell> cmake .
shell> make
shell> make install
# End of source-build specific instructions
# Postinstallation setup
shell> cd /usr/local/mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &
# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql
./bin/mysqladmin -u root password
vi /etc/my.cnf
[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
# These are commonly set, remove the # and set as required.
basedir = /usr/local/mysql
datadir = /var/lib/mysql
port = 3306
# server_id = .....
#socket = /var/lib/mysql/mysql.sock
user=mysql