Step 1:
rpm -Uvh https://repo.mysql.com/mysql80-community-release-el7-3.noarch.rpm
Step 2:
sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/mysql-community.repo
Step 3:
yum --enablerepo=mysql80-community install mysql-community-server
Step 4:
service mysqld start
Step 5: Show temp password copy temp password
grep "A temporary password" /var/log/mysqld.log
Step 6: Copy temp password and set new password
mysql_secure_installation
Step 7:
Enter password for user root:
The existing password for the user account root has expired. Please set a new password.
New password:
Re-enter new password:
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Step 8:
service mysqld restart
Step 9: Connect mysql
mysql -u root -p
No comments:
Post a Comment