- 论坛徽章:
- 0
|
- Antiy7@ubuntu8.04:~$ mysql -u root -p
- Enter password:
- Welcome to the MySQL monitor. Commands end with ; or \g.
- Your MySQL connection id is 9
- Server version: 5.0.51a-3ubuntu5.4 (Ubuntu)
- Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
- mysql> select user,host,password from mysql.user;
- +------------------+----------------+-------------------------------------------+
- | user | host | password |
- +------------------+----------------+-------------------------------------------+
- | root | localhost | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
- | root | jijunxu-ubuntu | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
- | root | 127.0.0.1 | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
- | | localhost | |
- | | jijunxu-ubuntu | |
- | debian-sys-maint | localhost | *8605DD8C7E41DD0DC68C9E9F8879B1E810B7B7A1 |
- +------------------+----------------+-------------------------------------------+
- 6 rows in set (0.00 sec)
- mysql>
复制代码
谢谢ruochen!
问题一目了然了!
mysql用户是root,
但是如果我这样输入:
- Antiy7@ubuntu8.04:~$ mysql //这个地方没有指定用户,那就是用当前用户了把?
- Welcome to the MySQL monitor. Commands end with ; or \g.
- Your MySQL connection id is 10
- Server version: 5.0.51a-3ubuntu5.4 (Ubuntu)
- Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
- mysql> select user();
- +-------------------+
- | user() |
- +-------------------+
- | Antiy7@localhost | //这个地方显示当前用户的名字,而不是root!问题是我如何知道当前数据库有几个用户呢?
- +-------------------+
- 1 row in set (0.00 sec)
- mysql>
复制代码
麻烦各位看看!
[ 本帖最后由 Antiy7 于 2008-12-11 19:45 编辑 ] |
|