MYSQL删除匿名用户的方法(提高安全性)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MYSQL删除匿名用户的方法(提高安全性)相关的知识,希望对你有一定的参考价值。
mysql中删除匿名用户详细步骤如下:
[[email protected] ~]#mysql -u root -p ← 通过密码用root登录
Enter password: ← 在这里输入密码
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7 to server version: 4.1.20
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the buffer.
mysql>select user,host from mysql.user; ← 查看用户信息
+------+----------------------------+
| user | host |
+------+----------------------------+
| | localhost |
| root | localhost |
| | sample.centospub.com |
| root | sample.centospub.com |
+------+----------------------------+
4 rows in set (0.02 sec)
mysql> delete from mysql.user where user=‘‘; ← 删除匿名用户
Query OK, 2 rows affected (0.17 sec)
mysql> select user,host from mysql.user; ← 查看用户信息
+------+----------------------------+
| user | host |
+------+----------------------------+
| root | localhost |
| root | sample.centospub.com |
+------+----------------------------+
2 rows in set (0.00 sec)
mysql> exit ← 退出MySQL服务器
Bye
本文出自 “12259248” 博客,转载请与作者联系!
以上是关于MYSQL删除匿名用户的方法(提高安全性)的主要内容,如果未能解决你的问题,请参考以下文章