想必大家在命令行操作mysql的時候會十分發愁現在的操作的是那個數據庫吧,至少我就糾結過,可能您會說我打一條命令不就知道了,是的這樣做確實可以的。
可是今兒給大家介紹個好用的命令--prompt
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.
root@localhost:(none) 08:23:32>use test;
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
root@localhost:test 08:23:44>exit;
您也可以在在my.cnf配置文件里進行配置:
default-character-set=utf8
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.
mysql(root@localhost:(none))>use test;
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(root@localhost:test)>
| Option | Description |
|---|---|
/c | A counter that increments for each statement you issue |
/D | The full current date |
/d | The default database |
/h | The server host |
/l | The current delimiter (new in 5.1.12) |
/m | Minutes of the current time |
/n | A newline character |
/O | The current month in three-letter format (Jan, Feb, …) |
/o | The current month in numeric format |
/P | am/pm |
/p | The current TCP/IP port or socket file |
/R | The current time, in 24-hour military time (0 主站蜘蛛池模板: 赣州市| 天峻县| 克东县| 太原市| 翼城县| 武定县| 涞源县| 张家口市| 大埔县| 呼伦贝尔市| 信宜市| 磐石市| 庆阳市| 肃宁县| 靖州| 秦安县| 重庆市| 施秉县| 漳平市| 镇安县| 于都县| 蓬安县| 大宁县| 淄博市| 深圳市| 永宁县| 永德县| 类乌齐县| 马鞍山市| 泰州市| 天长市| 高平市| 饶河县| 阿拉善右旗| 宣武区| 呼图壁县| 永城市| 麦盖提县| 合川市| 宜川县| 固阳县| |