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;
1sudo apt update
2sudo apt install mysql-server
3sudo mysql_secure_installation
1## To install mysql in Ubuntu ##
2sudo apt install mysql-server
3
4## For configuration
5sudo mysql_secure_installation
6
7# For password type YES or y ... enter you password
8# For removing user NO or n
9# For disallow login NO or n
10# For remove database NO or n
11# Reload table YES or y
12
13## DONE configurations ...
14
15## Start mysql with below command...
16sudo mysql -u root -p
17
18# Enter password which you add in configurations
19# Now you are all done...
20
21
22
23