Mysql

From roonics
Revision as of 11:18, 15 March 2019 by Jlambert (talk | contribs) (→‎MySQL)
Jump to navigation Jump to search

MySQL

Useful Commands

Connect to database

mysql -u <username> -p

Show process list

mysqladmin -p processlist

or if already connected to MySQL

show processlist;

Create database

CREATE DATABASE <db_name;

Show databases

show databases;

Select database

use <db_name>;

Show tables

show tables;

Show table layout

describe <table_name>;