MySQL installation using generic binaries-UNIX Platform (Article -06).

MySQL installation using generic binaries-UNIX Platform.

In this article we will come to know install MySQL using generic binaries.

Learning Objectives :

  • Choose the proper type of MySQL server software distribution.
  • Get an overview of MySQL installation tasks.
  • Load time zone tables.
  • Start and Stop the MySQL server.
  • Upgrade MySQL.

MySQL Binary Distribution

  • Available for several operating systems.
  • Precompiled programs.
  • Windows

– Essentials

– Complete with Configuration Wizard

– No-install

  • Linux

– RPM files

– Tar files

  • See website for more specific packages .

 – https://dev.mysql.com/downloads/mysql/

Advantage with  Binary Distribution 

  • Good selecting config options
  • High quality commercial compilers
  • Provided with extensive libraries

 

Installing MySQL using generic binaries

(Specific for Linux OS and need to do manual configurations it means you need to create your directories, users, assign roles and privileges to users before start installation.)

Note: Using binary distribution you can install older versions or release candidates as well

You can download binaries from https://dev.mysql.com/downloads/mysql/

In above picture click on Looking for previous GA versions  option on Right  side.

This option will used to install previous version of MYSQL.

Need to choose on which operating system we are installing .

Here we are installing 5.7.24 version of MySQL on Linux servers.

Now copy the link of of MySQL and paste in Ubuntu server and write wget at starting .

It will download by connecting Google link.

wget https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.62-linux-glibc2.12-x86_64.tar.gz

File is downloaded.

Note: You can get configuration steps from https://dev.mysql.com/doc/refman/5.6/en/binary-installation.html

As shown above it requires dependency packages lets install first.

Below command is to download basic update for libaio package.

Installing libaio1 package

As mentioned above we need to create all necessary users and groups using below commands.

 

Step by step installation .

Extracting downloaded MySQL file

Next step we are creating symbolic link to above highlighted folder in BLUE.

Go to mysql directory and list out the files.

Go to scripts folder you will see mysql_install_db this is the script which will initialize and create default MySQL database and basis user information.

In below command we are using – -user=mysql this is the same user which we create earlier.

Once script execution completed check for errors, if any errors found you need to fix those errors to proceed further.

Below step we are executing mysqld_safe script as mysql user in background, mysqld_safe in bin folder actually initializes MySQL server, and this actually calls mysqld process.

Next step we are copying mysql.server file to /etc/init.d folder this will enable you start/stop from mysql folder itself in other words when ever server boots/restart it will directly go to init.d and check and start MySQL accordingly, if this step is not performed above step need to execute manually every time we restart MySQL.

Let’s go to bin directory in this we have all scripts in those scripts mysql script is available, this script will enable to connect MySQL we can directly connect because we don’t have any password yet.

Now run mysql using ./mysql

To check databases locations.

As shown below no password is set by default.

We need to export path as shown below to access this path (files/scripts under /usr/local/mysql/bin) from any location.

My.cnf file is necessary to start/stop mysql database by default this file won’t be there we need to create it manually navigate to /usr/local/mysql/support_files

Copy my-default.cnf file from /usr/local/mysql/support-files to /etc as my.cnf file.

copy the my-huge.cnf to /etc with the name of my.cnf

 

 

 

 

Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading...

Add Comment