Mysql的匿名用户是做什么的?

Harivz 发布于 2016/06/24 13:49
阅读 184
收藏 1

<无详细内容>

加载中
0
polly
polly

新安装的mysql默认是有匿名用户的,你在本机,输入任意用户名都可以登录,只不过不可以访问mysql库。

# mysql -u zhangsan
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| test               |
+--------------------+
2 rows in set (0.00 sec)

mysql>

polly
polly
如果mysql 只允许本机访问,就可以不需要权限就登录使用数据库吧。
Harivz
Harivz
就是不知为什么不能访问,还要有这个用户?
0
让往事随风
让往事随风

是匿名的用户权限问题:http://edu.51cto.com/course/course_id-5054.html可以删除delete from mysql.user where user='';或者用grant赋予用户权限

返回顶部
顶部