01-28-2021, 09:28 AM
## Install Package
wget https://dev.mysql.com/get/mysql57-commun...noarch.rpm
## verify the integrity of the download by running md5sum
md5sum mysql57-community-release-el7-9.noarch.rpm
## we’ll install the package:
rpm -ivh mysql57-community-release-el7-9.noarch.rpm
## This adds two new MySQL yum repositories, and we can now use them to install MySQL server:
yum install mysql-server
## Starting the Services
systemctl start mysqld
systemctl enable mysqld
systemctl status mysqld
## Create an temporary password for root user
grep 'temporary password' /var/log/mysqld.log
## run the security script.
mysql_secure_installation
## verify our installation
mysqladmin -u root -p version
## To access server
mysql -u root -p
## Basic Tasks
#mysql > SELECT user,authentication_string,plugin,host FROM mysql.user;
# mysql > ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
# mysql > FLUSH PRIVILEGES;
# mysql > SELECT user,authentication_string,plugin,host FROM mysql.user;
# mysql > exit
#create user "uvdesk"@"localhost" identified by 'password';
#grant all on mydb to "uvdesk"@"localhost";
# mysql > FLUSH PRIVILEGES;
# mysql > exit
#CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
#GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
#FLUSH PRIVILEGES;
##To provide a specific user with a permission, you can use this framework:
#GRANT type_of_permission ON database_name.table_name TO 'username'@'localhost';
##If you need to revoke a permission, the structure is almost identical to granting it:
#REVOKE type_of_permission ON database_name.table_name FROM 'username'@'localhost';
##You can review a user’s current permissions by running the following:
#SHOW GRANTS FOR 'username'@'localhost';
##Just as you can delete databases with DROP, you can use DROP to delete a user altogether:
#DROP USER 'username'@'localhost';
## Check the password length
#SHOW VARIABLES LIKE 'validate_password%';
#SET GLOBAL validate_password_length = 6;
#SET GLOBAL validate_password_policy = LOW
#SET GLOBAL validate_password_number_count = 0;
wget https://dev.mysql.com/get/mysql57-commun...noarch.rpm
## verify the integrity of the download by running md5sum
md5sum mysql57-community-release-el7-9.noarch.rpm
## we’ll install the package:
rpm -ivh mysql57-community-release-el7-9.noarch.rpm
## This adds two new MySQL yum repositories, and we can now use them to install MySQL server:
yum install mysql-server
## Starting the Services
systemctl start mysqld
systemctl enable mysqld
systemctl status mysqld
## Create an temporary password for root user
grep 'temporary password' /var/log/mysqld.log
## run the security script.
mysql_secure_installation
## verify our installation
mysqladmin -u root -p version
## To access server
mysql -u root -p
## Basic Tasks
#mysql > SELECT user,authentication_string,plugin,host FROM mysql.user;
# mysql > ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
# mysql > FLUSH PRIVILEGES;
# mysql > SELECT user,authentication_string,plugin,host FROM mysql.user;
# mysql > exit
#create user "uvdesk"@"localhost" identified by 'password';
#grant all on mydb to "uvdesk"@"localhost";
# mysql > FLUSH PRIVILEGES;
# mysql > exit
#CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
#GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
#FLUSH PRIVILEGES;
##To provide a specific user with a permission, you can use this framework:
#GRANT type_of_permission ON database_name.table_name TO 'username'@'localhost';
##If you need to revoke a permission, the structure is almost identical to granting it:
#REVOKE type_of_permission ON database_name.table_name FROM 'username'@'localhost';
##You can review a user’s current permissions by running the following:
#SHOW GRANTS FOR 'username'@'localhost';
##Just as you can delete databases with DROP, you can use DROP to delete a user altogether:
#DROP USER 'username'@'localhost';
## Check the password length
#SHOW VARIABLES LIKE 'validate_password%';
#SET GLOBAL validate_password_length = 6;
#SET GLOBAL validate_password_policy = LOW
#SET GLOBAL validate_password_number_count = 0;