This page contains the common code snippets used to installing and setup MySQL server initially on your personal machine.


If you have homebrew

brew install mysql  
mysql.server restart  


sudo apt-get install mysql-server  


Figure out yourselves :P

Setting up database and user

Creating new database

create database newdatabase;  

Creating new user

create user 'newuser'@'%' identified by 'newpassword';  

Now exit and login with new user

mysql -u newuser -p