ubuntu server install mysql code example

Example 1: install mysql ubuntu

sudo apt install mysql-server

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;

Example 3: install mysql client ubuntu

apt-get install mysql-client

Example 4: install mysql in ubuntu

systemctl status mysql.service

Example 5: installing mysql on ubuntu

systemctl status mysql

Example 6: install mysql in ubuntu

sudo apt-get install mysql-serverCode language: JavaScript (javascript)

Tags:

Sql Example