We're here to assist with any of your needs, don't hestitate to reach out.
MySQL is a popular open-source relational database management system (RDBMS) widely used for building web applications. It provides a reliable, scalable, and secure database platform for storing and managing structured data.
It's always recommended to start by updating your CentOS system to ensure you have the latest packages installed. Open a terminal and run the following command:
sudo dnf update -y
MySQL is available in the default CentOS repositories. Install it by running the following command:
sudo dnf install mysql-server -y
During the installation, you will be prompted to confirm the installation. Press 'y' and then press Enter to proceed.
After the installation is complete, start the MySQL service using the following command:
sudo systemctl start mysqld
To ensure the security of your MySQL installation, run the following command to secure the installation:
sudo mysql_secure_installation
This command will guide you through a series of prompts to configure various security options for your MySQL installation. For example, you will be prompted to set a root password, remove anonymous users, disable remote root login, and remove test databases. Follow the prompts and make the appropriate selections based on your requirements.
To verify that MySQL is running correctly, use the following command:
sudo systemctl status mysqld
If MySQL is running, you will see an output with 'active (running)' status.
To access MySQL from the command line, use the following command:
mysql -u root -p
You will be prompted to enter the root password you set during the configuration process. Once logged in, you can start working with your MySQL databases.
That's it! You have successfully installed and configured MySQL on CentOS 8. You can now start using MySQL to build and manage your web applications.
What our customers say about us
Create your free account today.