How to install MySQL in Ubuntu using the terminal

Follow us
Translate :
EN

MySQL in Ubuntu

MySQL is an open-source relational database management system (RDBMS) that is widely used for managing and storing data. It is a popular choice for web applications and is known for its flexibility, performance, and ease of use. To install MySQL in Ubuntu using the terminal, follow the steps below:

  1. Open a terminal window on your Ubuntu system. You can do this by pressing Ctrl+Alt+T simultaneously or by searching for "Terminal" in the application launcher.

  2. Update the package list by running the following command:

    sudo apt update
  3. Once the package list is updated, you can proceed with the installation of MySQL. Run the following command:

    sudo apt install mysql-server
  4. During the installation, you will be prompted to set a password for the MySQL root user. Choose a strong password and remember it, as you will need it to access the MySQL server.

  5. After the installation is complete, you can start the MySQL service by running the following command:

    sudo service mysql start
  6. To verify that MySQL is running, you can check its status by executing the following command:

    sudo service mysql status

If MySQL is running, you will see a message indicating its status as "active (running)."

Congratulations! You have successfully installed MySQL on your Ubuntu system. You can now use the MySQL command-line client or any other MySQL client application to interact with the database server.

Note: It is recommended to secure your MySQL installation by running the MySQL security script. You can do this by executing the following command:

sudo mysql_secure_installation

The script will guide you through the process of securing your MySQL installation by configuring options such as removing anonymous users, disallowing remote root login, and removing test databases. It is advisable to follow the prompts and answer the questions to enhance the security of your MySQL server.



Top 6 Websites to Read Manga, Manhua, and Manhwa in English
How to Install Darktable on Ubuntu
How to Download Songs on Spotify
ID Telegram Yang Mana? Cara Mencari Id Telegram
How to Turn Off Notifications for Apps on iPhone
© 2024 MyPurTech