標籤: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刪除匿名使用者的方法(提高安全性)