Thursday, 15 May 2014

How to install MySQL on Ubuntu

 
 
 
Follow the following steps:
 
 
sudo apt-get update
sudo apt-get dist-upgrade
 
Install the MySQL server and client packages:

sudo apt-get install mysql-server mysql-client
When done, you have a MySQL database read to rock 'n roll. However, there's more to do.
You need to set a root password, for starters. MySQL has it's own user accounts, which are not related to the user accounts on your Linux machine. By default, the root account of the MySQL Server is empty. You need to set it. Please replace 'mypassword' with your actual password and myhostname with your actual hostname.
sudo mysqladmin -u root -h localhost password 'mypassword' sudo mysqladmin -u root -h myhostname password 'mypassword' 

You can now access your MySQL server like this:

mysql -u root -p

 
 

1 comment: