First remove all mysql related packages sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-5.5 sudo apt-get autoremove sudo apt-get autoclean Remove mysql directories rm /etc/mysql/ -R rm /var/lib/mysql/ -R Now install mysql-server sudo apt-get install mysql-server Note the root password you created . Now use the following to enter into mysql terminal mysql -u root -p