Installing MySQL Server in Ubuntu 16.04

Basically, this is a post which is made to describe on how to uninstall MySQL Server installation in Ubuntu Linux distribution. I decide to uninstall MySQL server because it has already crashed. Due to the space storage which has already full caused the operation performed by MySQL service to write data has already failed. I am trying to recover it but the process itself has come to a dead end. Instead of wasting lots of time for troubleshooting trying to straight up MySQL Server in order to be properly functioned, I decide to uninstall it and reinstall it with a brand new one. Below is the installation process :

Using apt-get command, we can remove any kinds of package which have already been installed. The execution of the command is shown below :

apt-get install mysql-server

After finishing on execute the above command, we will execute another command which is shown as follows with the steps explained :

In the above entry part, we have to enter the password which is assigned to ‘root’ user.

VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No: Y

Since this VALIDATE PASSWORD plugin is a new thing added in this version of MySQL, we will try to setup VALIDATE PASSWORD plugin. Type ‘Y’ for yes and start to setup it.

I type 0 for low level of password validation policy since this is only a workstation I used as a local development.

Estimated strength of the password: 50
Change the password for root ? ((Press y|Y for Yes, any other key for No) : No

I also type No to change the root password since I have already picked the simplest password for root because of local development environment.

By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother.You should remove them before moving into a production environment.
Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y
Success.

Just remove anonymous users by typing Y in the above entry.

Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y
Success.

Disallow root login by typing ‘Y’ in the above entry.

By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment.
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y
- Dropping test database...
Success.

Dropping test database by typing ‘Y’ in the above entry.

- Removing privileges on test database...
Success.
Reloading the privilege tables will ensure that all changes made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y
Success.

Reloading all the tables privilege by typing ‘Y’ in the above entry.

All done!
root@hostname:~#

Since the installation process has already finished, we can now begin to start the service by typing the following command :