how to install mysqlclient in ubuntu code example

Example 1: mysqlclient install ubuntu

sudo apt-get install python3-dev default-libmysqlclient-dev build-essential
pip install mysqlclient

Example 2: how to install mysql ubuntu

sudo apt update
sudo apt install mysql-server
sudo service mysql start
sudo mysql_secure_installation
sudo mysql -u root 

In mysql console:
DROP USER 'root'@'localhost';
CREATE USER 'root'@'%' IDENTIFIED BY 'YOURPASSWORD';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;