mysql创建用户?需要注意什么?如:user3@localhost
create user ‘user3’@‘localhost’ identified by ‘QianFeng@123’;
mysql删除用?
drop user ‘user3’@‘localhost’
mysql查询用户?
select user,host from mysql.user;’
mysql改密码?
(1)[root@localhost ~]mysqladmin -uroot -p’QianFeng@123’ password ‘QianFeng@1234’
(2)mysql> set password=password(‘QianFeng@123’);
(3)mysql>
update mysql.user
set
authentication_string = password(‘QianFeng@12345’)
where
user=‘root’
and
host=‘localhost’
超级管理员破解mysql的root账户密码?
1.修改mysql配置文件
vi /etc/my.cnf
skip-grant-tables
2.重启mysql
systemctl restart mysqld
3.免密登录
mysql
4.修改密码(略)
5.注释掉跳过密码的配置。并重启。
#skip-grant-tables
[root@localhost ~]systemctl restart mysqld