MySQL DBA - Tips and Techniques Magazine

23 Oct 2014

Install MYSQL on LINUX

Here is an example of doing the install for PAT environment.


 

1. Define requirements:

 

Install on mk-pat-simulator-1 , 10.44.42.2

 

Install latest mySQL version 5.0

 

Version of linux we have is 

 

view /etc/redhat-release

 

 

CentOS release 5 (Final)

 

 

The processor type is

 

uname -a

 

Linux mk-pat-simulator-1.uk.intranet 2.6.18-8.el5 #1 SMP Thu Mar 15 19:46:53 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

 

 

Ensure you have root access .

 

 

2.  Follow instructions on

 

2.4.9. Installing MySQL from RPM Packages on Linux

 

 

( Takes you to the community download page

 

Choose the correct Linux version and processor.

 

Red Hat Enterprise Linux 5 RPM (x86) downloads  )

 

Download Server and Client.

 

Saved to desktop & Upload to the server (due to security restrictions on server).

 

 

1.     Do minimal install

 

sudo bash

 

cd /home/hlakhan

 

Server:

 

rpm –ivh MySQL-server-community-5.0.51a-0.rhel5.i386.rpm

 

Client:

 

rpm -ivh MySQL-client-community-5.0.51a-0.rhel5.i386.rpm

 

 

 

[

 NB  Server gave error messages because an older version was already installed

 

rpm -ivh MySQL-client-community-5.0.51a-0.rhel5.i386.rpm

Preparing...                ########################################### [100%]

        file /usr/bin/msql2mysql from install of MySQL-client-community-5.0.51a-0.rhel5 conflicts with file from package mysql-5.0.22-2.1

 

 

Can check to see which mysql packages are already installed:

 

rpm -qa |grep -i mysql

 

mysql-5.0.22-2.1

mysql-5.0.22-2.1

 

 

Need to erase the old ones :

 

rpm -e --allmatches mysql-5.0.22-2.1

 

           

And then install – works!

]

           

 

To check the install :

 

 

mysql

 

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 1

Server version: 5.0.51a-community MySQL Community Edition (GPL)

 

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

 

mysql> exit

 

 

ls -lrt  /var/lib/mysql

 

/sbin/service mysql restart

 

Shutting down MySQL.[  OK  ]

Starting MySQL[  OK  ]

 

 

To set the passwords

 

2.4.16.3. Securing the Initial MySQL Accounts

 

No comments:

Post a Comment