Ticker

6/recent/ticker-posts

Advertisement

How to install MysSQL 5.7 on centOS


First update your server using mention command

#yum -y update

After updating completed on your server use below mention command for installation of MySQL5.7

for installation of MySQL 5.7


Before installation of MySQL 5.7 enable MySQL Repository

# yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm

After enable MySQL repository Install MySQL 5.7 Server

# yum install mysql-community-server

Now start mysql service

# service mysqld start

Get Temporary root Password using mention below command

# grep 'A temporary password' /var/log/mysqld.log |tail -1

Initial MySQL Configuration

Mysql secure installation script and follow the wizard. It will prompt for root password. Use the temporary root password got in above step.

# /usr/bin/mysql_secure_installation

After run the above mention command will prompt you for inputs. Input new strong password for MySQL root account. For remaining options read option and provide input as required. We recommend to press ‘y’ to all for better security.
Securing the MySQL server deployment.
Enter password for user root: type here your temporary password
The 'validate password' plugin is installed on the server.
The subsequent steps will run with the existing configuration
of the plugin.
Using existing password for root.
Estimated strength of the password: 100
Change the password for root ? ((Press y|Y for Yes, any other key for No) : y
New password: ******************
Re-enter new password: ******************
Estimated strength of the password: 100
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a productionenvironment.
Remove anonymous users? (Press y|Y for Yes, any other key for No) :N
Success.
Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : N
Success.
By default, MySQL comes with a database named 'test' that
Anyone can access. This is also intended only for testing,
And should be removed before moving into a production Environment.
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
 - Dropping test database...
Success.
- Removing privileges on test database...
Success.
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.
All done

Check MySQL Version

#mysql -V



Post a Comment

0 Comments