对顺序乱了的test表进行重排序:
create table test_new like test;
insert into test_new select * from test order by id;
再将test表删除,将test_new表更名即可
对老版本修改root密码为123456
依次执行:
use mysql;
UPDATE user SET password=PASSWORD("123456") WHERE user='root';
FLUSH PRIVILEGES;
对新版本修改root密码为123456
依次执行:
flush privileges;
alter user 'root'@'localhost' identified with mysql_native_password by '123456';