MySQL Database Installation Using RPM Package on
Redhat & Other Linux
Download below RPM Packages below MySQL Site.
http://dev.mysql.com/downloads/mysql/
[root@SERVER11 ~]# ls -ltr
-rwxrwxr-x. 1 root root 3806848 Feb 5 10:59 mysql-community-devel-5.7.10-1.el6.x86_64.rpm
-rwxrwxr-x. 1 root root 23788680 Feb 5 11:21 mysql-community-client-5.7.10-1.el6.x86_64.rpm
-rwxrwxr-x. 1 root root 140055132 Feb 5 11:41 mysql-community-server-5.7.10-1.el6.x86_64.rpm
-rwxrwxr-x. 1 root root 2229848 Feb 5 12:04 mysql-community-libs-5.7.10-1.el6.x86_64.rpm
-rw-r--r--. 1 root root 332252 Feb 5 12:29 mysql-community-common-5.7.10-1.el6.x86_64.rpm
Install RPM Packages:
[root@SERVER11 ~]# rpm -ivh mysql-community-common-5.7.10-1.el6.x86_64.rpm
warning: mysql-community-common-5.7.10-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:mysql-community-common ########################################### [100%]
[root@SERVER11 ~]# rpm -ivh mysql-community-libs-5.7.10-1.el6.x86_64.rpm
warning: mysql-community-libs-5.7.10-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:mysql-community-libs ########################################### [100%]
[root@SERVER11 ~]# rpm -ivh mysql-community-client-5.7.10-1.el6.x86_64.rpm
warning: mysql-community-client-5.7.10-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:mysql-community-client ########################################### [100%]
[root@SERVER11 ~]# rpm -ivh mysql-community-server-5.7.10-1.el6.x86_64.rpm
warning: mysql-community-server-5.7.10-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... ########################################### [100%]
1:mysql-community-server ########################################### [100%]
MySQL stop / start Service:
[root@SERVER11 ~]#
service mysqld stop
Stopping mysqld: [ OK ]
[root@SERVER11 ~]#
service mysqld start
Starting mysqld: [ OK ]
[root@SERVER11 ~]#
service mysqld status
mysqld (pid 3138) is running...
Get Temp. MySQL Password:
[root@SERVER11 ~]# grep 'temporary password' /var/log/mysqld.log
2016-02-05T07:28:43.322922Z 1 [Note] A temporary password is generated for root@localhost:
e%clot#eT4he
[root@SERVER11 ~]# mysql -uroot -p
Enter password:
Type Above Temp. password "e%clot#eT4he"
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.10
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.
Reset the password:
mysql>
ALTER USER 'root'@'localhost' IDENTIFIED BY 'mohan@123';
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
[root@SERVER11 ~]# mysql -uroot -p
Enter password:
Type New Password "mohan@123"
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.10 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.
mysql> quit
Bye
Check MySQL Service Running Status Commands:
[root@SERVER11 ~]#
ps -eaf | grep mysql
root 2942 1 0 12:59 pts/0 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql
mysql 3138 2942 0 12:59 pts/0 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock
root 3249 2279 0 13:05 pts/0 00:00:00 grep mysql
[root@SERVER11 ~]#