" Re-enter mysql and this is it:"/> " Re-enter mysql and this is it:">

Home  >  Article  >  Database  >  How to set prompt for mysql in linux

How to set prompt for mysql in linux

王林
王林forward
2023-06-03 15:12:02998browse

为 mysql 设置提示符

有时候需要同时连接到多台服务器的,并且操作不同的 mysql,由于 mysql 命令行默认没有用户或主机的提示符,这样容易误操作,所以可以在 /etc/my.cnf 文件中添加以下配置来显示 mysql 的提示符:

[mysql]  prompt="\\u@\\h : \\d \\r:\\m:\\s>"

重新进入 mysql 就这样了:

How to set prompt for mysql in linux

The above is the detailed content of How to set prompt for mysql in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete