Installation Steps
- Install wget :- (Optional)
$ sudo yum install wget
- Download mysql :-
- Verify Integrity Value :-
To check downloaded file is corrupted or not fire the below command
$ md5sum mysql80-community-release-el7-3.noarch.rpm
As we cross checked both md5 values are same in above images, so now we verified that file was not corrupted.
- Adding Downloaded package into yum Repository:-
$ sudo rpm -ivh mysql80-community-release-el7-3.noarch.rpm
- Installing Mysql:-
$ sudo yum install mysql-server
- Check root user password :-
During installation, the root user password is generated and stored in mysqld.log file.
$ sudo grep 'temporary password' /var/log/mysqld.log
So the password is 5xgQoryw2F(=
The default password policy requires 12 characters, with at least one uppercase letter, one lowercase letter, one number and one special character.
- Configuring MySql :-
Run the security script to set new password of root user
$ sudo mysql_secure_installation
Press Y for all questions – in order to remove anonymous users,
disallow remote root login, remove the test database and access to it, and
reload the privilege tables.
- To Verify our Installation:-
$ mysqladmin -u root -p version
Note: MySQL is automatically enabled to start at boot when it is installed. You can change that default behavior with
$ sudo systemctl disable mysqld
- Starting MySql & Checking Status of MySql:-
$ sudo systemctl start mysqld
$ sudo systemctl status mysqld
Installation successfully completed.
- Connecting MySql:-$ mysql -u username -p
FAQs
Problem
After Installation we faced issue that couldn't able to access mysql server remotely.
Solution
Note:
- Add Public Ip on hosts file $ Sudo vi /etc/hosts
- Add bind-address=0.0.0.0 on $ Sudo vi /etc/my.cnf
- Set host as '%' while creating user to access remote from anywhere.







No comments:
Post a Comment