一个 mysql server 上的小技巧
浏览:3075次 出处信息
在my.cnf 的 mysql 端 添加如下设置
[mysql] #no-auto-rehash # faster start of mysql but no tab completition prompt="(\u:mysql1@linuxbyte.org \R:\m)[\d]: "
会产生如下效果:
root@ubuntu:/home/hew# mysql -u hew -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 320 Server version: 5.1.41-3ubuntu12.1 (Ubuntu) Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. (hew:mysql1@linuxbyte.org 21:12)[(none)]: use linuxbyte #注意这里 Database changed (hew:mysql1@linuxbyte.org 21:13)[linuxbyte]: use linuxsky; #这里 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 (hew:mysql1@linuxbyte.org 21:13)[linuxsky]: #这里
如上所示我们可以在mysql命令行下显示当前的mysql 用户,所在主机,时间和所用的数据库。
这个在关键时刻可以让我们避免很多误操作。
建议继续学习:
- 最近总结的一些技巧(vim,python,svn,fiddler等) (阅读:7709)
- Linux常用命令,命令行技巧 (阅读:4712)
- 我的防身暗器-网页设计应急小技巧 (阅读:3901)
- Mac OS X 中的小技巧 (阅读:3635)
- 网页设计师应该知道的9个Photoshop小技巧 (阅读:3672)
- 你必须收藏的Github技巧 (阅读:3320)
- CSS使用技巧大全 (阅读:3232)
- 8大实用又重要Mac使用技巧 (阅读:3181)
- 改良程序的11技巧 (阅读:3014)
- 针对设计专业人员的一些基本技巧 (阅读:2308)
QQ技术交流群:445447336,欢迎加入!
扫一扫订阅我的微信号:IT技术博客大学习
扫一扫订阅我的微信号:IT技术博客大学习
<< 前一篇:WordPress数据字典
后一篇:mysql latin1转utf8 的两种方法 >>
文章信息
- 作者:xiao H 来源: LinuxByte
- 标签: 技巧 误操作
- 发布时间:2010-05-24 09:48:04
建议继续学习
近3天十大热文
-
[930] WordPress插件开发 -- 在插件使用 -
[130] 解决 nginx 反向代理网页首尾出现神秘字 -
[51] 如何保证一个程序在单台服务器上只有唯一实例( -
[51] 海量小文件存储 -
[50] 整理了一份招PHP高级工程师的面试题 -
[49] CloudSMS:免费匿名的云短信 -
[48] 全站换域名时利用nginx和javascri -
[48] 用 Jquery 模拟 select -
[47] Innodb分表太多或者表分区太多,会导致内 -
[46] ps 命令常见用法
