关闭Mysql远程连接
作者:未知 文章ID:7759 浏览:
1、登录 Mysql-Server 连接本地 mysql
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\kuco>mysql -h localhost -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 5.1.45-community-log MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
2、修改 Mysql-Server 用户配置
mysql> USE mysql;
Database changed
mysql> SELECT User, Password, Host FROM user;
+------+----------+-----------+
| User | Password | Host |
+------+----------+-----------+
| root | | localhost |
| root | | % |
+------+----------+-----------+
2 row in set (0.00 sec)
3、删除第二条记录
mysql>Delete FROM user Where Host="%";
4、验证删除是否成功
mysql> SELECT User, Password, Host FROM user;
+------+----------+-----------+
| User | Password | Host |
+------+----------+-----------+
| root | | localhost |
+------+----------+-----------+
1 row in set (0.00 sec)
只剩下一条记录表示删除成功。