Step 1:Register the MySQL Ubuntu repository:
wget https://repo.mysql.com//mysql-apt-config_0.8.24-1_all.deb
dpkg -i mysql-apt-config_0.8.24-1_all.deb
Cheice MySQL Server &
Cluster (Currently selected: mysql-8.0)
Cheice MySQL -8.0
Step 2:Run the following commands to install MySQL:
sudo
apt-get update
sudo apt install mysql-server
Step 3: Once MySQL is installed, you can check the status
of service by using the command given below:
sudo systemctl enable mysql
sudo systemctl start mysql
sudo systemctl status mysql
Step 4: Setting for remote client access
mysql -u root -p
use mysql;
# Create User
CREATE USER ‘root’@’%’ IDENTIFIED BY ‘root’;
# grant
grant all privileges on *.* to ‘root’@’%’ ;
# refresh data
FLUSH PRIVILEGES;
# change
password
ALTER USER ‘root’@’%’ IDENTIFIED WITH
mysql_native_password BY ‘Client@2022’;