aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
  • Tools
  • About
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
  • Tools
  • About
  • Data
  • Programming

How To Install And Configure MySQL In Ubuntu

  • root
  • June 6, 2019
  • 2 minute read

Overview

This guide contains instructions on how to install and do basic configuration of a MySQL database. At the time of this writing, the stable version is 5.7.

 


Partner with aster.cloud
for your next big idea.
Let us know here.


cyberpogo

Prerequisites

  • Operating System: Ubuntu 18.04
  • Access to a Terminal or Shell Console (Need proper and consistent term for this)

 

Installation via Package Manager

01. Open a terminal window

 

02. Update the package repository and install MySQL. This will install the latest and most stable version of the database.


$ sudo apt update

$ sudo apt install mysql-server -y

 

03. Verify the MySQL has been installed


$ mysql --version

 

Securing the MySQL

Securing the MySQL database is a recommended step.

01. Run MySQL secure installation. Then type y or Y when asked to confirm execution.


$ sudo /usr/bin/mysql_secure_installation

 

02. Enter 2 option for a STRONG password

 

03. Choose a strong password with the following criteria

  • Minimum length : 8
  • Has a number [0-9]
  • Has a lower case character [a-z]
  • Has an upper case character [A-Z]
  • Has a special character (e.g. @, $, %, etc.)

A sample password that satisfy the criteria : 123g33kN1kolaT3sl@. You can use this tool to generate a strong password: https://bartday.com/password_generator.html

 

04. Enter the password then confirm by entering y

 

05. Remove the anonymous user by entering y. It is advisable to remove the anonymous user.

By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment.

 

Read More  How Macy’s Enhances The Customer Experience With Google Cloud Services

06. Disallow root login remotely. This is a security concern, if you don’t want the root user to be accessible remotely. Enter y.

 

07. Remove the test database, enter y.

By default, MySQL comes with a database named ‘test’ that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment.

 

08. Enter y to reload the privilege tables.

 

09. Test the MySQL config, by login using the root account.


$ sudo mysql -u root -p

# Enter the root password


Our humans need coffee too! Your support is highly appreciated, thank you!

root

Related Topics
  • Configuration
  • Database
  • How To
  • Installation
  • MySQL
  • Ubuntu
You May Also Like
View Post
  • Automation
  • Computing
  • Data

IBM To Help Automate Cloud Data Protection With Acquisition Of Polar Security

  • May 25, 2023
View Post
  • Programming
  • Software Engineering
  • Technology

Build a Python App to Alert You When Asteroids Are Close to Earth

  • May 22, 2023
View Post
  • Programming

Illuminating Interactions: Visual State In Jetpack Compose

  • May 20, 2023
View Post
  • Data
  • Public Cloud

Cloud Data Loss Prevention’s Sensitive Data Intelligence Service Is Now Available In Security Command Center

  • May 18, 2023
View Post
  • Data
  • Platforms
  • Technology

Cloudflare’s R2 Is The Infrastructure Powering Leading AI Companies

  • May 16, 2023
View Post
  • Computing
  • Data
  • Programming
  • Software
  • Software Engineering

The Top 10 Data Interchange Or Data Exchange Format Used Today

  • May 11, 2023
View Post
  • Data
  • Public Cloud

Using Cloud Spanner To Handle High Throughput Writes

  • May 8, 2023
View Post
  • Architecture
  • Programming
  • Public Cloud

From Receipts To Riches: Save Money W/ Google Cloud & Supermarket Bills – Part 1

  • May 8, 2023

Stay Connected!
LATEST
  • 1
    Building A Kubernetes Platform: How And Why To Apply Governance And Policy
    • June 4, 2023
  • 2
    Leave, This “United” “Kingdom”, This “Great” “Britain”
    • June 4, 2023
  • 3
    Amazing Federated Multicloud Apps
    • June 2, 2023
  • 4
    What’s The Future Of DevOps? You Tell Us. Take The 2023 Accelerate State Of DevOps Survey
    • June 2, 2023
  • 5
    Resolving Deployment Issues With Ts-node And Azure Development Pipelines
    • June 1, 2023
  • 6
    What To Expect From Apple’s WWDC 2023
    • June 1, 2023
  • 7
    What Is Platform Engineering And Why Adopt It In Your Company?
    • June 1, 2023
  • 8
    Four Steps To Managing Your Cloud Logging Costs On A Budget
    • May 31, 2023
  • 9
    Red Hat Puts Podman Container Management On The Desktop
    • May 30, 2023
  • 10
    The Agile Mindset: A Path to Personal Fulfillment and Growth
    • May 30, 2023
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • 1
    Huawei ICT Competition 2022-2023 Global Final Held In Shenzhen — 146 Teams From 36 Countries And Regions Win Awards
    • May 27, 2023
  • 2
    Huawei OceanStor Pacific Scale-Out Storage Tops IO500 Rankings
    • May 26, 2023
  • 3
    MongoDB And Alibaba Cloud Extend Global Partnership
    • May 25, 2023
  • 4
    Tricentis Launches Quality Engineering Community ShiftSync
    • May 23, 2023
  • 5
    G7 2023: The Real Threat To The World Order Is Hypocrisy.
    • May 27, 2023
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.