MYSQL 8 - Installation
MYSQL 8 - Installation
1) To avoid conflict of the different of MYSQL we need to first disable the default
MYSQL module.
To disable the module, copy and paste the below command.
yum module disable mysql -y
Once done your good to go with the fresh installation of MYSQL.
2) Adding the MySQL Yum Repository
This is a one-time operation, which can be performed by installing an RPM provided by MySQL.
Download the MYSQL RPM from the below URL and install.
https://dev.mysql.com/get/mysql80-community-release-el8-4.noarch.rpm
The installation command adds the MySQL Yum repository to your system's repository list and
downloads the GnuPG key to check the integrity of the software packages.
3) Installing MySQL
To install MySQL 8.0, copy and paste the below command.
To replace the file, first upload the my.cnf file to the server, once the file is uploaded to the server
use the below command to replace the file.
cp -r my.cnf /etc/
once you execute the command you will receive below warning message.
If you don’t receive any message after executing the above command that means MySQL has started
successfully.
Let’s now confirm whether the service is running or not.
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Memory: 1.5G
CGroup: /system.slice/mysqld.service
└─68681 /usr/sbin/mysqld
If you see active and running, this means your good to go further.
Now lets login to mysql and finish the setup
To login to mysql you need to find the password which has already been generated while starting
the MySQL service.
The output will be similar to the below example, instead of xxxxxx you find the auto generated
password in that place, Just select the password and it will be copied automatically.
mysql -u root -p
Once you hit enter you will be prompted for password just right click on the mouse and the
password will be pasted, now again hit enter and you will enter mysql command prompt, similar to
one below.
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>”
mysql>ALTER USER 'root'@'localhost' IDENTIFIED BY 'Put a strong complex password in this place';
This will change the mysql auto generated password to custom password.
All done.