$
mysqldump db_name my_table
$
mysqldump db_name my_table > output.sql
$
mysqldump --no-data db_name my_table > dump_table_name.sql
$
mysqldump --add-drop-table db_name my_table > dump_table_name.sql
$
mysqladmin create db_name
$
mysqladmin drop db_name
$
mysqladmin flush-privileges
$
mysqladmin ping
$
mysqladmin reload
$
mysqladmin kill ps_id,ps_id...
$
mysqladmin --user=root shutdown
$
mysqladmin variables
$
mysqlimport db_name file_name ...
$
safe_mysqld
$
myisamchk table_name.MYI
mysql>
GRANT ALL ON db_name TO user_name@localhost IDENTIFIED BY 'password'
mysql>
GRANT ALL ON db_name TO user_name@'%' IDENTIFIED BY 'password'
$ mysql --help | less
$ mysqld --help
$ mysqlshow --help | less
$ mysqldump --help | less
$ mysqlshow - show all databases.
$ mysqlshow db_name - all tables in particular database.
$ mysqlshow db_name BA* - all tables which start from BA letters.
mysql> \?
mysql> use db_name;
mysql> show databases;
mysql> show databases like 'ba%'
mysql> show tables;
mysql> describe table_name;
mysql> select user(), now(), version(), database();
+---------------+---------------------+----------------+------------+
| user() | now() | version() | database() |
+---------------+---------------------+----------------+------------+
| ana@localhost | 2003-01-05 21:24:27 | 4.0.1-alpha-nt | test |
+---------------+---------------------+----------------+------------+
mysql> show tables from db_name
mysql> show tables from db_name like '__ab%'
mysql> show columns from table_name
mysql> show columns from table_name from db_name
mysql> show grants for user_name
mysql> show index from table_name
mysql> show index from table_name from db_name
mysql> show processlist
mysql> show status
mysql> show table status from db_name
mysql> show variables
Comments
Post a Comment