当我在mysql中输入show grants for user
然后系统显示:
| GRANT USAGE ON *.* TO ''@'%' IDENTIFIED BY PASSWORD '*1E80DD016234830553A761E48526725559582391' |
| GRANT ALL PRIVILEGES ON `mydatabase`.`mytable` TO 'user'@'%'
所以我输入了
grant all privileges on *.* to 'user'@'%' identified by 'passwd';
然后系统显示
GRANT ALL PRIVILEGES ON *.* TO 'user'@'%' IDENTIFIED BY PASSWORD '*EC75E3374932E7506AB7858A3B026E93FB8ED3DF'
GRANT ALL PRIVILEGES ON `mydatabase`.`mytable` TO 'user'@'%'
为什么我设置user
的密码,但有两种现象:
哈希码已更改,但我的passwd
密码未显示在表格中。
mysql -u user
它可以登录到服务器,但是mysql -u user -p
然后显示拒绝访问?