As you manage more and more mysql servers, the same mysql prompt may allow you to enter wrong commands to the wrong database. At this time, you need to use the mysql prompt, this is my prompt root @ localhost (mysql) 08:55:21 using prompt command implementation (applicable to windows and linux environments)
As you manage more and more mysql servers, the same mysql prompt may allow you to enter wrong commands to the wrong database. At this time, you need to use the mysql prompt, this is my prompt root @ localhost (mysql) 08:55:21 using prompt command implementation (applicable to windows and linux environments)
Mysql> prompt \ u @ \ h (\ d) \ r: \ m: \ s>
\ U: connected to the user
\ H: connect to the host
\ D: connect to the database
\ R: \ m: \ s: display the current time
Mysql> prompt \ u @ \ h (\ d) \ r: \ m: \ s>
Root @ localhost (mysql) 08:55:21> status
--------------
Mysql Ver 14.14 Distrib 5.1.33, for Win32 (ia32)
Connection id: 2
Current database: mysql
Current user: root @ localhost
SSL: Not in use
Using delimiter :;
Server version: 5.1.33-community-log MySQL Community Server (GPL)
Protocol version: 10
Connection: localhost via TCP/IP
Server characterset: gb2312
Db characterset: gb2312
Client characterset: latin1
Conn. characterset: latin1
TCP port: 3306
Uptime: 6 min 6 sec
Threads: 2 Questions: 867 Slow queries: 0 Opens: 129 Flush tables: 1 Open t
Ables: 9 Queries per second avg: 2.368
--------------
Root @ localhost (mysql) 08:55:29>