查找配置文件的順序及參數:mysql
/usr/bin/mysql --help --verborse查看:sql
Default options are read from the following files in the given order:/etc/mysql/my.cnf /etc/my.cnf ~/.my.cnfcentos
設置密碼:服務器
啓動服務:systemctl start mariadb
spa
鏈接服務器:mysqlseo
選擇mysql表:use mysql;
io
刪除無user項: mariadb
drop user ''@'localhost';
配置
drop user ''@'www.centos.pig';
date
設置密碼:update user set passeord=password('your_password') where user='root';
讓服務器重讀:flush privileges;