Basic MySQL Terminal Commands

July 17, 2008

To start MySQL monitor;

mysql -u root -p

Other commands;

show databases;
use enter_database_name_here;
show tables;
describe enter_table_name_here;

Show data from a particular column in a table;

SELECT enter_column_name_here FROM enter_table_name_here;

Update the data in a particular column in a table;

UPDATE enter_table_name_here SET enter_column_name_here = ‘enter_new_value_here’ WHERE id =’enter_id_here’;

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.