You are on page 1of 1

MySQL terminal commands

antony@AA-Laptop:~$ mysql -u root -p


mysql> show databases;
+--------------------+
| Database
|
+--------------------+
| information_schema |
| addr_book
|
| db1_aa.sql
|
| drupal6
|
| emails_db
|
| ikaroi
|
| joomla
|
| joomlaa1
|
| mysql
|
| phpmyadmin
|
+--------------------+

11 rows in set (0.14 sec)

mysql> use addr_book;


mysql> show tables;
+---------------------+
| Tables_in_addr_book |
+---------------------+
| address
|
| email
|
| fax
|
| master_name
|
| personal_notes
|
| telephone
|
+---------------------+
6 rows in set (0.00 sec)

mysql> status
-------------mysql Ver 14.14 Distrib 5.1.41, for debian-linux-gnu (i486) using readline 6.1
Connection id:
169
SSL:
Not in use
Current pager:
stdout
Using outfile:
''
Using delimiter:
;
Server version:
5.1.41-3ubuntu12.9 (Ubuntu)
Protocol version:
10
Connection:
Localhost via UNIX socket
Client characterset:
latin1
Server characterset:
latin1
UNIX socket:
/var/run/mysqld/mysqld.sock
Uptime:
1 hour 5 min 49 sec
Threads: 1 Questions: 520 Slow queries: 0
Queries per second avg: 0.131
--------------

Opens: 955

Flush tables: 1

Open tables: 64

mysql> select * from fax;


+----+-----------+---------------------+---------------------+-------------+------+
| id | master_id | date_added
| date_modified
| fax_number | type |
+----+-----------+---------------------+---------------------+-------------+------+
| 1 |
1 | 2011-02-04 18:45:31 | 2011-02-04 18:45:31 | 210-9873844 | home |
| 2 |
2 | 2011-02-04 18:50:07 | 2011-02-04 18:50:07 | 210-9873849 | home |
+----+-----------+---------------------+---------------------+-------------+------+

2 rows in set (0.02 sec)


mysql> quit
Bye
antony@AA-Laptop:~$

A.Andreatos, Feb. 2011

You might also like