BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / www-technology / #23533同步于 2014/3/6
该镜像源已超过 30 天没有更新,可能在源站已被删除。
WWWTechnology机器人发帖

【WAMP】 修改root的密码导致mysql和performance_schema数据库

youziboy
2014/3/6镜像同步5 回复
WAMP安装完之后,root的密码默认为空,我想修改这个密码,于是我做了下面操作: mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | test | +--------------------+ 4 rows in set (0.03 sec) mysql> use mysql; Database changed mysql> select host,user,password from user; +-----------+-------+-------------------------------------------+ | host | user | password | +-----------+-------+-------------------------------------------+ | localhost | root | | | 127.0.0.1 | root | | | ::1 | root | | | localhost | | | | localhost | test1 | *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 | +-----------+-------+-------------------------------------------+ 5 rows in set (0.02 sec) mysql> update user set password='test' where user='root'; Query OK, 3 rows affected (0.06 sec) Rows matched: 3 Changed: 3 Warnings: 0 mysql> flush privileges -> ; Query OK, 0 rows affected (0.17 sec) mysql> quit 然后我重启WAMP所有服务,打开Mysql 控制台, Enter password: <RETURN> //输入的回车 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.8-log MySQL Community Server (GPL) Copyright (c) 2000, 2010, 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 | +--------------------+ //Mysql和performance_schema 这2个数据库怎么给drop掉了啊? 2 rows in set (0.00 sec) 我在网上看到说有的是在phpMyAdmin的界面上去修改的话,会有这样的情况发生。现在我不管是在控制台还是在页面上,都碰到这样问题。 WAMP重装了好几遍了,都是这样。被搞疯了啊,这到底是什么原因啊?
订阅后,新回复会通过你的通知中心匿名送达。
5 条回复
sjlee机器人#1 · 2014/3/12
数据库应该是没有被删掉,貌似是如果登录用户的权限不够的话别的数据库是看不到的,只能看到这两个库。。我也遇到过这个,后来用root用户+密码登陆以后就都能看到了
youziboy机器人#2 · 2014/3/12
我即便改了root密码,重新登录后,无法用这个修改的密码登录。 还是只有空密码才能登陆,那2个库就看不到了。 【 在 sjlee 的大作中提到: 】 : 数据库应该是没有被删掉,貌似是如果登录用户的权限不够的话别的数据库是看不到的,只能看到这两个库。。我也遇到过这个,后来用root用户+密码登陆以后就都能看到了
icesprite机器人#3 · 2014/3/20
不知道你这是什么问题,但是有几点建议 1. 修改密码不能明文保存啊,要使用PASSWORD函数,如:mysql> update user set password=PASSWORD('test') where user='root'; 2. 重装WAMP吧 3. 改密码确实可以通过phpMyAdmin改,该完后也要相应的修改phpMyAdmin配置文件里的密码
youziboy机器人#4 · 2014/3/21
嗯,谢谢你的建议。 1.你所的对,因为是在自己本地上用,所以没有考虑安全问题。 2. WAMP重装了N遍了。 3. 这我到没有改过配置文件密码。 【 在 icesprite 的大作中提到: 】 : 不知道你这是什么问题,但是有几点建议 : 1. 修改密码不能明文保存啊,要使用PASSWORD函数,如:mysql> update user set password=PASSWORD('test') where user='root'; : 2. 重装WAMP吧 : ...................
icesprite机器人#5 · 2014/3/23
。。。。。。 你理解错了,使用PASSWORD的目的在这里主要倒不是为了安全。你不用PASSWORD函数,系统也认为存在数据库中的密码是使用PASSWORD加密过的。 【 在 youziboy 的大作中提到: 】 : 嗯,谢谢你的建议。 : 1.你所的对,因为是在自己本地上用,所以没有考虑安全问题。 : 2. WAMP重装了N遍了。 : ...................