想必大家在命令行操作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 主站蜘蛛池模板: 大冶市| 夏邑县| 通渭县| 涞水县| 灵璧县| 米脂县| 柳林县| 隆子县| 忻州市| 望奎县| 宜昌市| 新津县| 鹿邑县| 望都县| 固原市| 浙江省| 师宗县| 沭阳县| 孝感市| 玛多县| 吉水县| 伊吾县| 厦门市| 南康市| 股票| 天峻县| 乌拉特前旗| 岳池县| 资溪县| 桂林市| 礼泉县| 临桂县| 城市| 阳原县| 巨野县| 平罗县| 临城县| 宝山区| 崇义县| 清水河县| 抚松县| |