#本地连接
mysql -u root -p
# 选择mysql数据库
use mysql;
# 设置密码
update mysql.user set authentication_string=password('*******') where user='*******';
# 使用mysql数据库
use mysql;
# 查看系统表
show tables;
# 查看系统用户表
select * from user;
# 设置允许任意远程访问
update user set host = '%' where user = 'root';
# 刷新内存中的权限,就不用重启mysql服务了
flush PRIVILEGES;