一、mysql root用户登录:
mysql -uroot -p
二、切换到用户库
use mysql;
三、查找当前用户
select User from user;
四、查找端口
show global variables like ‘port’;
五、更新用户密码
update mysql.user set authentication_string=password(‘’) where user='’;
注意:添加用户
CREATE USER ‘username’@‘host’ IDENTIFIED BY ‘password’;