11 June 2008

mysql command lines basic

mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 5.0.45-Debian_1ubuntu3.3 Debian etch distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
use myapplicationl_development;

Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql>
SELECT * FROM mailing_jobs where status != 'done';

Empty set (0.00 sec)

mysql> show databases;

mysql> show tables;

# Use back quotes for tables whose names contain spaces (very bad idea if you ask me)
select count(*) from `gmail account`;

No comments: