Install MySql on Ubuntu
Learn how to install MySql on Ubuntu
MySQL is an open-source relational database management system (RDBMS) where data is organized into one or more data tables in which data types may be related to each other.
The reference version used in this tutorial is Ubuntu 20.04.
Update system packages (recommneded)
1
$ sudo apt update
Copied!
Install the mysql-server package
1
$ sudo apt install mysql-server
Copied!
Configure the MySql server (using sudo)
1
$ sudo mysql_secure_installation
Copied!
This command will take the user through a series of prompts where you can make some changes to your MySQL installation’s security options.
The most important step in this setup is when we are asked for the password of the MySql root user.
1
Please set the password for root here.
2
​
3
New password: ******
4
Re-enter new password: ******
Copied!
​
Copy link