How To Install MySQL on Ubuntu 20.04

How To Install MySQL on Ubuntu 20.04
Riddhi Jindal
Riddhi Jindal

Created: 06/04/2020 10:00 AM - Updated: 06/04/2020 10:00 AM

How To Install MySQL on Ubuntu 20.04

Step 1 — Installing MySQL

·         sudo apt update
·          
·         sudo apt install mysql-server
·          

Step 2 — Configuring MySQL

·         sudo mysql_secure_installation
·          

Step 3 — Testing MySQL

·         systemctl status mysql.service
·          

You should see Active: active (running) in the output for it to be successful.

·         sudo mysqladmin -p -u root version
·          
Output
mysqladmin  Ver 8.0.19-0ubuntu5 for Linux on x86_64 ((Ubuntu))
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
 
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
 
Server version      8.0.19-0ubuntu5
Protocol version    10
Connection      Localhost via UNIX socket
UNIX socket     /var/run/mysqld/mysqld.sock
Uptime:         10 min 44 sec
 
Threads: 2  Questions: 25  Slow queries: 0  Opens: 149  Flush tables: 3  Open tables: 69  Queries per second avg: 0.038

This means MySQL is up and running.

Was this article helpful?

0 Out of 0 Marked As Helpfull

Have more questions? Please Contact Us