How To Install MySQL On Ubuntu – Linux?

We will download and install MySQL on Ubuntu / Linux. Word ‘My’ is the name of the daughter of Michael Widenius’s co-founder and “SQL” stands for Structured Query Language.

The MySQL database management system is a relational database management system based on SQL queries.

Data operations are carried out on this server, such as querying, filtering, sorting, grouping, modifying, and joining tables.

MySQL has the following features in common:

  1. You can download it for free and use it easily.
  2. Important data is protected by a solid data security layer.
  3. Client-server architecture.
  4. Scalability is enhanced by multithreading.
  5. Multi-application support makes it highly flexible.
  6. MySQL performs fast, efficiently, and reliably.
  7. Windows, macOS, Linux, and many others are compatible with it.


Install mysql on ubuntu – Linux

The following commands are used to install MySQL on Ubuntu or almost any Linux flavour:

Step 1: Press Ctrl+Alt+T to open the terminal. Update your server’s package index if it hasn’t been updated recently to install it – Install MySQL by copying and pasting the following command.

sudo apt update
sudo apt install mysql-server
OR
apt install mysql-server

install mysql on ubuntu step 1

Step 2: Once you have entered your password, hit ENTER & Press “Y”.

install mysql on ubuntu step 2

It will take some time for MySQL to be downloaded and installed on ubuntu Linux.

install mysql on ubuntu step 3

Step 3: The following command can be entered into your Terminal in order to verify the installation or to know the version number.

mysql --version

install mysql on ubuntu step 4

Step 4: We will now set the component VALIDATE PASSWORD.

sudo mysql_secure_installation

install mysql on ubuntu step 5

To set the password, press “y”. To set a low-level password, press “0” or select the password you wish to set. Make a password. Re-enter the password, then press “Y” to continue.

install mysql on ubuntu step 6

We are now done with the entire setup process.

Visit our article to learn how to use MySQL with Python or go directly to the root directory on Linux.

sudo mysql -u root

Here is how we can create a database:

create database database_name;

install mysql on ubuntu step 7

show databases;
We value your feedback.
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0

Subscribe To Our Newsletter
Enter your email to receive a weekly round-up of our best posts. Learn more!
icon

Leave a Reply

Your email address will not be published. Required fields are marked *