Skip to main content

MySQL 8.0 Binary Installation: A Step-by-Step Guide

MySQL 8.0 Installation: A Comprehensive Guide

Aim :

Install MySQL 8.0 using the binary distribution on a Linux system.

MySQL 8.0 Installation Steps

Step 1: Prepare System and User

  • Create a MySQL group:
    groupadd mysql
  • Create a MySQL user with restricted shell access:
    useradd -r -g mysql -s /bin/false mysql

Step 2: Download and Extract MySQL

  • Navigate to the installation directory(Not compulsory):
    cd /usr/local
  • Extract the MySQL tarball:
    tar xvf /path/to/mysql-VERSION-OS.tar.xz
  • Create a symbolic link:
    ln -s full-path-to-mysql-VERSION-OS mysql
  • Navigate to the MySQL directory:
    cd mysql
  • Create a directory for MySQL files:
    mkdir mysql-files
  • Set ownership and permissions:
    chown mysql:mysql mysql-files
    chmod 750 mysql-files
  • Optional: Set ownership of mysql folder
    sudo chown -R mysql /usr/local/mysql/
    
  • Initialize MySQL with the specified user:
    bin/mysqld --initialize --user=mysql
  • Optional: Initialize MySQL SSL:
    bin/mysql_ssl_rsa_setup
  • Start MySQL:
    bin/mysqld_safe --user=mysql &
  • Optional: Copy MySQL server configuration to init.d:
    cp support-files/mysql.server /etc/init.d/mysql.server

Step 3: Install libaio Library

  • Search for libaio information:
    apt-cache search libaio
  • Install libaio:
    apt-get install libaio1

Step 4: Verify MySQL Version and Save Temporary Password

  • Check MySQL version:
    bin/mysql --version
  • Retrieve and save the temporary password from the MySQL error log.
    grep 'temporary password' data/error.log

Verification:

Verify MySQL installation by connecting to the MySQL server using the saved temporary password.

bin/mysql -u root -p

Steps to Remove MariaDB Dependencies in RHEL

Stop MariaDB Service:

sudo systemctl stop mariadb
sudo systemctl disable mariadb

Remove MariaDB Packages:

sudo yum remove mariadb mariadb-server

Remove MariaDB Configuration Files (Optional):

If you want to remove all configuration files and data, use the following commands:

sudo rm -rf /var/lib/mysql
sudo rm -rf /etc/my.cnf
sudo rm -rf /etc/my.cnf.d
sudo rm -rf /etc/mysql

Clean Up Unused Dependencies:

sudo yum autoremove

For the MySQL installer, you can also download it from the official website: MySQL Installer

Written by: A.M.Rinas

Contact: mohomadrinas00@gmail.com

Comments

Popular posts from this blog

Use Katalon Studio in ubuntu

How to Install and Use Katalon Studio for Web Testing Step-by-Step Guide to Installing Katalon Studio Katalon Studio is a powerful tool for automating web, API, and mobile testing. In this guide, we'll walk you through the installation process and show you how to create your first test case for a web application. Step 1: Download Katalon Studio Start by downloading the latest version of Katalon Studio from the official website. Choose the version that suits your operating system. Step 2: Extract and Run the Application Once the download is complete, extract the contents of the downloaded file. Inside the extracted folder, locate the katalon.sh file (for Linux users) and run it to launch Katalon Studio: ./katalon If you're on Windows...

A Step-by-Step Guide to Installing XMIND on Ubuntu

Installing XMIND on Ubuntu Problem: Installing XMind on Ubuntu for Mind Mapping and Visualization Installing XMind on Ubuntu: A Comprehensive Guide Mind mapping is a powerful technique for visualizing thoughts, ideas, and information. XMind is a popular tool that provides a user-friendly platform for creating mind maps. In this guide, we will walk through the steps to install XMind on Ubuntu, enabling you to harness the benefits of this versatile mind mapping tool. Guidance on How to Install: Prerequestic: Sometimes you have to install snap store, for that type following command. Install snap store in Ubuntu: sudo snap install snap-store Follow these steps to install XMIND on Ubuntu successfully: Open a terminal window.(Ctrl+Alt+T) Run the following command to upd...

Creating a Docker Network for Container Communication

Essential SQL Queries for Database Exploration and Management | By A.M.Rinas How to Create a Docker Network Creating a Docker network allows containers to communicate with each other while isolating them from external traffic. This is particularly useful for managing services that need to interact within a defined network. Follow these steps to create a Docker network: Step 1: Open Your Terminal Access your terminal or command prompt where Docker is installed. Step 2: Create a Docker Network Use the following command to create a new Docker network: docker network create your_network_name Replace your_network_name with a name that makes sense for your application. Step 3: Verify the Network Creation You can verif...