first delete it in case a root password was previously created:
sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.5 mysql-client-core-5.5
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get autoremove
sudo apt-get autoclean
then install it:
then start up the mysql command line:
mysql -u root -p
Create a user:
CREATE USER 'user' IDENTIFIED BY 'mypass';
Then grant privileges:
GRANT ALL PRIVILEGES ON * . * TO 'user'
Then create a database:
CREATE DATABASE dbname;
Or use a database:
USE dbname