Install MySQL 8.0 on CentOS 8
1. Install the repo
:
yum install https://repo.mysql.com/mysql80-community-release-el8-1.noarch.rpm
2. Check if repo
has successfully been added:
yum repolist enabled | grep “mysql.*-community.*”
3. Install mysql
and mysql-server
:
yum install mysql mysql-server
4. Start MySQL Server
systemctl start mysqld
5. Check status of MySQL Server
systemctl status mysqld
6.Enable MySQL Server
at Start
systemctl enable mysqld
4.Check on which port
MySQL Server listening :
netstat -ntpl | grep mysqld
You should see it listens on port 3306
5. Verify MySQL
version using:
mysql –version
MySQL has generated a temporary password which we will use t reset the root password.
6. To obtain the password run the command:
grep ‘password’ /path/to/mysql/log
7. Then run:
mysql_secure_installation
8. Connect to MySQL
using:
mysql -u root -p