Redhat Enterprise Linux (RHEL) Install and Configure MySQL Database Server

www‮‬.lautturi.com
Redhat Enterprise Linux (RHEL) Install and Configure MySQL Database Server

To install and configure MySQL, a popular open-source database management system, on Red Hat Enterprise Linux (RHEL), follow these steps:

  1. Add the MySQL package repository to your system's package sources by running the following command:
sudo dnf install https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm
  1. Install MySQL by running the following command:
sudo dnf install mysql-community-server

This will install the MySQL server and client programs, as well as any dependencies required.

  1. Enable the MySQL service to start automatically at boot time by running the following command:
sudo systemctl enable mysqld
  1. Start the MySQL service by running the following command:
sudo systemctl start mysqld
  1. Secure the MySQL installation by running the following command:
sudo mysql_secure_installation

This will prompt you to set a root password for MySQL, as well as to remove anonymous user accounts and disallow remote root login. Follow the prompts to complete the security configuration.

  1. Once the installation is complete, you can log in to the MySQL command line by running the following command:
mysql -u root -p

Enter the root password you set during the security configuration to log in. From the MySQL command line, you can create and manage databases, users, and other objects.

That's it! You now have MySQL installed and configured on your Red Hat Enterprise Linux system. You can use it to store and manage data for your applications.

Created Time:2017-10-16 14:38:54  Author:lautturi