1、登录:
mysql -u [username] -p[password]
2、查看数据库
show databases;
3、使用某个数据库
use [dbname]
4、查看当前数据库的数据表
show tables;
5、命令行查看mysql字符集:
mysql> SHOW VARIABLES LIKE 'character%';
+--------------------------+-------------------------------+| Variable_name | Value |
+--------------------------+-------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | D:\wamp\mysql\share\charsets\ |
+--------------------------+-------------------------------+
待续。。。