Skip to main content

MySQL Server Installation on Ubuntu

This post will describe how to install MySQL Server in Ubuntu platform.

This installation is general irrespective of Ubuntu version. (It has been tested in Ubuntu 18.04.2)

1. Open terminal window in Ubuntu

2. Enter the following commands one by one:

   Command-1: sudo apt-get update

   Command-2: sudo apt-get install mysql-server

   Command-3: sudo systemctl status mysql  (type 'q' to quit)  (This command varies with version)

   Command-4: sudo mysql_secure_installation

   Follow the steps and supply password when asked for.

3. Installation is complete. Open MySQL Server using the command:

    If you have not provided password for the root account during the previous step, use:

    sudo mysql -u root -p   
 
   If you have set a password, use:   

    sudo mysql -u root -p  password_you_provided

You are now ready to create and work with databases.

Comments