• Home
    »
  • Install MySQL In Ubuntu

How To Install MySQL In Ubuntu?

My SQL is a free, open-source database that allows you to add, access, and modify the contents as per your needs. If you wish to know how to install MySQL in Ubuntu, then you have reached the right page to perform it.

Let’s see how in detail.

To check whether you have an SSH Client on your Linux computer, follow these steps.

  1. First, make sure to sign in to your Ubuntu system with sudo privileges.
  2. Now, open the Terminal application on your computer.
  3. First of all, you need to update the apt package.
  4. To do so, run the following command in the Terminal window: $ sudo apt update
  5. Once the apt package has been updated, install the MySQL package on your Ubuntu using the command mentioned below: $ sudo apt install mysql-server

  1. Wait for the installation process to complete.
  2. Once the package installation process has been completed, you can see the MySQL service starting automatically.
  3. If it fails to launch, then run the command mentioned below: $ sudo mysql_secure_installation utility
  4. To verify the SQL server status, run the following command in the Terminal window: $ sudo systemctl status mysql or to know how to install MySQL in Ubuntu

That’s it! The My SQL server has been installed successfully in Ubuntu.

Now, if you wish to provide remote access to the My SQL server, then run the below commands in the Terminal window.

sudo ufw enable

sudo ufw allow mysql

Similarly, to initiate the MySQL service, use the following command:

$ sudo systemctl start mysql

If you want the My SQL server to launch after a reboot, then run the command mentioned below in the Terminal window.

$ sudo systemctl enable mysql

To restart the My SQL service on your device, use the following command:

$ sudo systemctl restart mysql

To know more about how to install MySQL in Ubuntu, contact us.

how to install MySQL in Ubuntu