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:
- You can download it for free and use it easily.
- Important data is protected by a solid data security layer.
- Client-server architecture.
- Scalability is enhanced by multithreading.
- Multi-application support makes it highly flexible.
- MySQL performs fast, efficiently, and reliably.
- 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
Step 2: Once you have entered your password, hit ENTER & Press “Y”.
It will take some time for MySQL to be downloaded and installed on ubuntu Linux.
Step 3: The following command can be entered into your Terminal in order to verify the installation or to know the version number.
Step 4: We will now set the component VALIDATE PASSWORD.
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.
We are now done with the entire setup process.
sudo mysql -u root
Here is how we can create a database:
create database database_name;