屏蔽密码登录
>mysql -uroot -p
> use mysql;
>create user 'root'@'localhost';
ERROR 1290 (HY000): The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement
报错,输入下令刷新即可
>flush privileges ;
>create user 'root'@'localhost';
# 赋予所有权限 并且修改root密码为123456
>grant all privileges on *.* to 'root'@'localhost' identified by '123456' with grant option;
>flush privileges ;