Published October 11, 2017 by

Install MySQL on Ubuntu/Linux

Following are the commnad for Installing MySql in Ubuntu/Linux system

# sudo apt-get update

# sudo apt-get install mysql-server

Re-enter the password.

Remeber mysql server automatic configure default port 3306.

# sudo mysql_secure_installation

Here mysql asks some few questions for configuration, give (yes/no) answers according your requirement.  

Check status of mysql

# sudo systemctl status mysql

Access mysql

# mysql -u root -p

Enter a Password of you set for root at installation time.

Quit/Exit mysql


Uninstall/Remove MySQL on Ubuntu/Linux

apt-get remove -y mysql-*

apt-get purge -y mysql-*