个人学习记录

Hello World

MySQL_重置密码

mysql重置密码


重置密码 grep "password" /var/log/mysqld.log

mysql -u root -p 密码

进入

alter user 'root'@'localhost' identified by 'Root!!2018';

CREATE USER ‘root‘@‘%‘ IDENTIFIED BY ‘您的密码‘;

grant all privileges on *.* to root@"%" identified by "~" with grant option;

GRANT ALL PRIVILEGES ON *.* TO 'root'@'hadoop1' IDENTIFIED BY 'root' WITH GRANT OPTION;

flush privileges use mysql update user set password=password("12345") where user="root";

flush privileges;