MySQL Notes
From Brandonhutchinson.com
(Difference between revisions)
| Line 1: | Line 1: | ||
* To list the databases on a MySQL server: | * To list the databases on a MySQL server: | ||
show databases; | show databases; | ||
| + | |||
| + | * To select a database on a MySQL server: | ||
| + | use ''database''; | ||
* To list the tables in a MySQL database: | * To list the tables in a MySQL database: | ||
Revision as of 15:38, 14 April 2008
- To list the databases on a MySQL server:
show databases;
- To select a database on a MySQL server:
use database;
- To list the tables in a MySQL database:
show tables;
- To securely provide a user password automatically, place user passwords within the [client] section of ~/.my.cnf. The file should have 600 or 400 permissions. e.g.,
[client] password="password"
