Skip to content

Instantly share code, notes, and snippets.

@mogetutu
Created March 12, 2014 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mogetutu/9501457 to your computer and use it in GitHub Desktop.
Save mogetutu/9501457 to your computer and use it in GitHub Desktop.

How to Install MySQL 5.5 on Ubuntu 12.04 Linux

MySQL is the most trusted and depended-on open source database platform in use today. As such, 9 out of the top 10 most popular and highly trafficked websites in the world rely on MySQL primarily due to its ubiquity across heterogeneous platforms and application stacks and for its well-known performance, reliability and ease of use. This blog entry will guide you through the step-by-step installation of MySQL 5.5 on Ubuntu Linux 12.04 LTS 32 bit. This installation is performed on a clean installation of Ubuntu Server 12.04 32 bit.

Step 1: Open your Terminal

Press the following keyboard shortcut:

Ctrl + Alt + T

Step 2: Update your package cache

Run the following command in your terminal:

sudo apt-get update

Step 3: Install the mysql-server-5.5 package

Run the following command in your terminal:

sudo apt-get install mysql-server-5.5

Step 4: Create a new MySQL database

Run the following commands in your terminal, replacing newdatabase, newuser and newpassword:

mysql -u root -p
CREATE DATABASE newdatabase;
GRANT ALL PRIVILEGES ON newdatabase.* TO newuser@localhost IDENTIFIED BY 'newpassword';
Press CTRL + D

Step 5: Check whether MySQL is running

Run the following command in your terminal:

sudo netstat -tap | grep mysql

You should see the following line or something similar:

tcp        0      0 localhost:mysql         *:*                LISTEN      2810/mysqld
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment