Readytocode
  • Home
  • Laravel
  • PHP
  • React Js
  • Git
  • Server
Facebook X (Twitter) Instagram
Readytocode
  • Home
  • Laravel
  • PHP
  • React Js
  • Git
  • Server
Facebook X (Twitter) Instagram Pinterest LinkedIn Reddit
Readytocode
You are at:Home Install MySQL Server on Ubuntu 22.04

Server

Install MySQL Server on Ubuntu 22.04

JustinBy JustinApril 20, 2022No Comments3 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email




Hello Developers, Today i am working on AWS, I need a database for my project. I think Why use Amazon RDS why not install mysql server on my ubuntu 20.04 system.
So in this post i will guide how we can install mysql on Ubuntu 20.04

Default Ubuntu repositories have MySQL 8.0. Which can be installed directly using the package manager without adding third-party PPA.

Use the below command to install from ubuntu repositories

$ sudo apt-get install mysql-server

Press ‘Y’ for any confirmation asked by the terminal.

Now your installation of mysql server is done. Its time to set password , users and access for your mysql server.

$ sudo mysql_secure_installation

Mysql securing wizard will be opened.

  1. Press ‘y’ to enable validate password plugin. This will allow you to set a strict password policy for user accounts.
    VALIDATE PASSWORD COMPONENT can be used to test passwords
    and improve security. It checks the strength of password
    and allows the users to set only those passwords which are
    secure enough. Would you like to setup VALIDATE PASSWORD component?
    
    Press y|Y for Yes, any other key for No: y
  2. Chose the password complexity level. Read the all 3 options and choose one:
    LOW    Length >= 8
    MEDIUM Length >= 8, numeric, mixed case, and special characters
    STRONG Length >= 8, numeric, mixed case, special characters and dictionary file
    
    Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 1
  3. Enter a new password and re-enter it. Make sure it matches the complexity level as described above.
    Press ‘y’ to continue with provided password.

    New password: *********** 
    Re-enter new password: ***********
  4. Press ‘y’ to continue with provided password.
    Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
  5. Remove default anonymous users from MySQL server:
    Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
  6. Disable root login from remote systems
    Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
  7. Remove test database form MySQL created by default during installation.
    Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
  8. Reload all privileges to apply above changes immediately.
    Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y

     

Now our mysql us secured and we will test this my connecting to mysql, use below command to connect with mysql

$ sudo mysql

Hope your mysql will connect.

also you can test you installed mysql version my using below command.

$ mysql -V

 

Thanks and Happy Coding.

Total
0
Shares
Share 0
Tweet 0
Pin it 0
Share 0

Like this:

Like Loading...

Related

install Mysql mysql mysql Ubuntu
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Justin
  • Website

Related Posts

How to install Steam on Ubuntu 22.04 step by step

April 20, 2023

What is, How to Install & Use Kali Linux

April 1, 2023

ufw status inactive on Ubuntu 22.04

March 30, 2023

Leave A Reply Cancel Reply

Featured Posts
  • Why meta tag is important for seo 1
    How to change react Page title, Page Description and some other meta Tag
    • August 4, 2023
  • 2
    How to Generate image from text with Laravel 10
    • May 16, 2023
  • Laravel 10 Restrict User Access 3
    Laravel 10 Restrict User Access
    • May 3, 2023
  • Laravel 10 Pagination Example 4
    Laravel 10 Pagination Example
    • May 3, 2023
  • install Steam on Ubuntu 5
    How to install Steam on Ubuntu 22.04 step by step
    • April 20, 2023



Readytocode
Facebook X (Twitter) Instagram Pinterest
  • About Us
  • Privacy Policy
© 2025 ReadyToCode.

Type above and press Enter to search. Press Esc to cancel.

%d