1sudo apt update
2sudo apt install mysql-server
3sudo service mysql start
4sudo mysql_secure_installation
5sudo mysql -u root
6
7In mysql console:
8DROP USER 'root'@'localhost';
9CREATE USER 'root'@'%' IDENTIFIED BY 'YOURPASSWORD';
10GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
11FLUSH PRIVILEGES;
1$ mysql
2$ sudo apt-get install mysql-server
3$ mysql -u root -p
4$ sudo mysql -u root -p
5$ use mysql;
6$ update user set plugin=”mysql_native_password” where user=’root’;
7$ flush privileges;
8$ exit
9$ mysql -u root -p
10$ create database demo;
11$ show databases;
1//follow this blog
2
3https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-18-04