Linux下使用sql语句登陆ERROR 1045 (28000
2019-11-27 本文已影响0人
猿二胖
问题描述:
使用Navicat for MySQL可以正常登陆数据库,但是在linux下使用mysql -u root -p指令登陆失败,报错“ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)”
问题解决
- grant all privileges on . to root@localhost identified by '你为root设置好的密码';
- flush privileges;