Simple Steps:
1. Install mySql by entering below command
sudo apt-get install mysql-server
Note: you have to feed the root password during the installation
2. We are done. MySQL is installed
3. Now lets login to MySQL and do some basic CURD operations
mysql -u root -p
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
4.
mysql> create table employee (empno int, empname varchar(50), empcity varchar(50)); ERROR 1046 (3D000): No database selected
mysql> create database sales -> ; Query OK, 1 row affected (0.00 sec) mysql> use sales Database changed
mysql> create table employee (empno int, empname varchar(50), empcity varchar(50)); Query OK, 0 rows affected (0.10 sec) mysql> insert into employee values (1001, 'Karthik', 'Chennai'); Query OK, 1 row affected (0.06 sec) mysql> insert into employee values (1002, 'Saravanan', 'NY'); Query OK, 1 row affected (0.06 sec) mysql> select * from employee; +-------+-----------+---------+ | empno | empname | empcity | +-------+-----------+---------+ | 1001 | Karthik | Chennai | | 1002 | Saravanan | NY | +-------+-----------+---------+ 2 rows in set (0.00 sec) mysql> exit
Aborted ram@hadoop:~$
Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking.Hadoop Administartion Online Course Bnagalore
ReplyDelete