mysql中怎么查看当前在哪个库中?
查看当前使用那个数据库:
status 命令可以。
mysql> status;
--------------
mysql Ver 14.12 Distrib 5.0.20a, for Win32 (ia32)
Connection id: 1
Current database: test
Current user: root@localhost
SSL: Not in use
Using delimiter: ;
Server version: 5.0.20a-nt
Protocol version: 10
Connection: localhost via TCP/IP
Server characterset: latin1
Db characterset: latin1
Client characterset: latin1
Conn. characterset: latin1
TCP port: 3306
Uptime: 44 sec
查看有哪些数据库:show databases;
查看有哪些用户:select user(); 或 select * from mysql.user;
查看当前使用哪个用户:status; 或 select current_user();