MySQL Installation on Unix Platform

Installation ->

Download 3 packages from MySQL Download Website:
MySQL-client-5.6.10-1.e16.x86_64.rpm
MySQL-server-5.6.10-1.e16.x86_64.rpm
MySQL-shared-5.6.10-1.e16.x86_64.rpm

Lists the downloaded file in respective directory:
ls – ltr

Check size of these packages —
du -sh * (Gives the size of package)

Installation Process –
Step 1) RPM the packages one by one ::
rpm -ivh MySQL-client-5.6.10-1.e16.x86_64.rpm

(Here ivh means :: i- Installation v- Verbose h-Hash)

–RPM all the packages -> Client/Server/Shared.

–After installation, a random pwd will be set for the root user. We can find that pwd in ‘/root/.mysql_secret’.

–Find that secret pwd ->
cat /root/.mysql_secret

–After Installation, we need to start the mysql service –>
service mysql start

chkconfig mysql on (This is to enable the services in Automatic mode from now on).

–Check the mysql port by:
nmap localhost
(by default its 3306)

— Now open mysql in CLI mode–>
mysql -h localhost -Uroot -Ppwd

–After logging in, you have to reset the pwd for root user (From the secret one)–>
set password for root@’localhost’=password(‘password@123’);
flush privileges

— Create a new DB–>
create database testdb;

–List all DB’s–>
show databases;

Advertisements

Author: sqlserverposts

Database Consultant by profession. I am a geek and a avid sports lover too. "Progress informed by the past, inspired by future".

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s