修改my.conf文件
跳过密码验证 skip-grant-tables
修改密码:
mysql7版本:
mysql> update mysql.user set authentication_string=password('cy7m0ypu8CpLFperzI45') where user='root' and Host = 'localhost';
flush privileges;
mysql8版本:
alter user 'root'@'%' identified by '123456';
flush privileges;