mysql

MySQL basics

Install MySQL in Ubuntu

sudo apt-get install mysql-server

Setup root password

mysqladmin -u root password password

​Create a database

1. Login to the mysql console

$ mysql -u root -p

2. Execute the next command

mysql> CREATE DATABASE newdb CHARACTER SET utf8 COLLATE utf8_unicode_ci;

Describe a table

mysql> DESCRIBE <table_name>

This will show the table fields and their features

Pages

Subscribe to RSS - mysql