Thursday, 13 December 2012

Ubuntu mysql installation



MySQL Server Installation

sudo apt-get install mysql-server

This would prompt for a root user password.

To verify the installation:

sudo netstat -tap | grep mysq

tcp        0      0 ip6-localhost:mysql     *:*                     LISTEN      14731/mysqld

Then type,
sudo mysql -u root -p

It prompts for the password after which should take you to the mysql shell.

mysql> CREATE DATABASE sqoopDB;

mysql> USE sqoopDB;

mysql> CREATE TABLE sample (name VARCHAR(10), age VARCHAR(10));

mysql> DESCRIBE sample;

mysql>SHOW TABLES;

mysql> INSERT INTO sample VALUES ('COGN1', '25')

Thats it.

No comments:

Post a Comment