How to install MySQL 8.0 Community Server and Uninstall in Rocky Linux 8 (RPM installation)
In this video we are going to see how to install MySQL 8.0 Community Server from RPM files in Rocky Linux 8.
1. install below mysql rpms as root user
mysql-community-client-8.0.41-1.el8.x86_64.rpm
mysql-community-client-plugins-8.0.41-1.el8.x86_64.rpm
mysql-community-common-8.0.41-1.el8.x86_64.rpm
mysql-community-icu-data-files-8.0.41-1.el8.x86_64.rpm
mysql-community-libs-8.0.41-1.el8.x86_64.rpm
and
mysql-community-server-8.0.41-1.el8.x86_64.rpm
2. enable mysql service and start mysql service as root user
systemctl enable mysqld
systemctl start mysqld
systemctl stop mysqld
3. login to mysql server using auto generated password.
grep 'temporary password' /var/log/mysqld.log
mysql -uroot -p
4. change the mysql root password in mysql command prompt.
ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';
5. start creating your own database and tables inside the database.
1. first stop the mysql service and disable the mysql service as root user.
systemctl stop mysqld
systemctl disable mysqld
2. to uninstall run below rpm command as root user which will erase every thing except data directory.
rpm --erase -v mysql_rpms_listed_above
3. after uninstalling remove the data directory and log file manually. Uninsatll complete.
rm -rf /var/lib/mysql
rm /var/log/mysqld.log
MySQL Installation Layout for Linux RPM Packages from the MySQL Developer Zone
Files or Resources Location
Client programs and scripts /usr/bin
mysqld server /usr/sbin
Configuration file /etc/my.cnf
Data directory /var/lib/mysql
Error log file
For RHEL, Oracle Linux,
CentOS or Fedora platforms: /var/log/mysqld.log
Pid file /var/run/mysql/mysqld.pid
Socket /var/lib/mysql/mysql.sock
Keyring directory /var/lib/mysql-keyring
Unix manual pages /usr/share/man
Include (header) files /usr/include/mysql
Libraries /usr/lib/mysql
Miscellaneous support files
(for example, error messages,
and character set files) /usr/share/mysql
#mysql8 #installmysql8 #setupmysql8 #mysqllinux #uninstallmysql #EL8