Simulated Environment: mysql running on ubuntu VM on cloud
Steps for creation
Create a ubuntu vm in aws/azure
Now login into the vm and execute the following commands. Refer Here for steps
sudo apt-get update
sudo apt-get install mysql-server
sudo mysql
SELECT user,authentication_string,plugin,host FROM mysql.user;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;
SELECT user,authentication_string,plugin,host FROM mysql.user;
CREATE USER 'qtdevops'@'%' IDENTIFIED BY 'motherindia@123';
GRANT ALL PRIVILEGES ON *.* TO 'qtdevops'@'%' WITH GRANT OPTION;
exit
sudo mysql -u qtdevops -p
Lets import sample database Refer Here and the database is present over here. Login into ubuntu machine and execute following
cd ~
git clone https://github.com/datacharmer/test_db.git
cd test_db
mysql -u qtdevops -p < employees.sql