1.) Change to root user
su
##OR##
su -c
2.) Check for latest version
yum list mysql mysql-server
3.) Update or Install Mysql
yum install mysql mysql-server
4.) Start MySQL server and autostart MySQL on boot
systemctl start mysqld.service ##Will start MySql##
systemctl enable mysqld.service ##Will enable MySql service on boot##
##OR##
service mysqld start
chkconfig –levels 235 mysqld on
5.) MySQL Secure Installation
/usr/bin/mysql_secure_installation
6.) Change the root user’s password
mysqladmin -u root password <your password>
7.) Connect to MySQL database (localhost) with password
mysql -u root -p
Thanks for reading. If you have any suggestions or query, please feel free to comment.