The world's most popular open source database.
Examples
The structure from top to bottom is: server->database->table->field->content
So get to the place you want in this order:
Connecting to mysql server from the shell.
shell> mysql -u root -p Enter password: Welcome to the MySQL monitor. mysql>
Switching into a database.
mysql> use wikidb; Database changed mysql>
Showing tables
mysql> show tables; +------------------+ | Tables_in_wikidb | +------------------+ | archive | | blobs | ... | imagelinks | | interwiki | ... | watchlist | +------------------+ 23 rows in set (0.00 sec)
Getting field names
mysql> describe interwiki; +-----------+------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+------------+------+-----+---------+-------+ | iw_prefix | char(32) | | PRI | | | | iw_url | char(127) | | | | | | iw_local | tinyint(1) | | | 0 | | +-----------+------------+------+-----+---------+-------+ 3 rows in set (0.00 sec)
Selecting content
mysql> select iw_prefix from interwiki; +-------------------+ | iw_prefix | +-------------------+ | AbbeNormal | | AcadWiki | | Acronym | | Advogato | | AIWiki | ... | Wiktionary | | YpsiEyeball | | ZWiki | +-------------------+ 107 rows in set (0.00 sec)
Using wildcards
You can use wildcards like in:
mysql> select * from interwiki;
Conditions (WHERE-clause)
You can combine with conditions like in:
mysql> select iw_url from interwiki where iw_prefix="UseMod"; +------------------------------------------+ | iw_url | +------------------------------------------+ | http://www.usemod.com/cgi-bin/wiki.pl?$1 | +------------------------------------------+ 1 row in set (0.00 sec)
.. to be extended ...