[mysqld]
select host,user,password from mysql.user;
update mysql.user set password='123456@Aa' where user='root';
set global read_only=0;
flush privileges;
set global read_only=1;
flush privileges;
GRANT all privileges ON *.* TO 'root'@'localhost' identified by '123456@Aa';
GRANT all privileges ON *.* TO 'root'@'%' identified by '123456@Aa';
drop user admin@localhost;
flush privileges;
CREATE USER 'root'@'localhost' IDENTIFIED BY '123456@Aa';
GRANT all privileges ON *.* TO 'root'@'localhost'
drop user admin@'%';
flush privileges;
CREATE USER 'root'@'%' IDENTIFIED BY '123456@Aa';
GRANT all privileges ON *.* TO 'root'@'%'
skip-grant-tables //用于解除权限登录
mysqld-nt --skip-grant-tables
select host,user,password from mysql.user;
update mysql.user set password='123456@Aa' where user='root';
set global read_only=0;
flush privileges;
set global read_only=1;
flush privileges;
GRANT all privileges ON *.* TO 'root'@'localhost' identified by '123456@Aa';
GRANT all privileges ON *.* TO 'root'@'%' identified by '123456@Aa';
drop user admin@localhost;
flush privileges;
CREATE USER 'root'@'localhost' IDENTIFIED BY '123456@Aa';
GRANT all privileges ON *.* TO 'root'@'localhost'
drop user admin@'%';
flush privileges;
CREATE USER 'root'@'%' IDENTIFIED BY '123456@Aa';
GRANT all privileges ON *.* TO 'root'@'%'