prompt命令可以在mysql提示符中显示当前用户、数据库、时间等信息 代码如下:mysql -uroot -p –prompt=”\\u@\\h:\\d \\r:\\m:\\s>”设置成功后: 代码如下:Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 5Server version: 5.1.60-log Source distributionCopyright (c) 2000, 2012, Oracle and/or its affiliates. All righ