查找配置文件的顺序及参数:
/usr/bin/mysql --help --verborse查看:
Default options are read from the following files in the given order:/etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf
设置密码:
启动服务:systemctl start mariadb
连接服务器:mysql
选择mysql表:use mysql;
删除无user项:
drop user ''@'localhost';
drop user ''@'www.centos.pig';
设置密码:update user set passeord=password('your_password') where user='root';
让服务器重读:flush privileges;