root 用户无法免密登陆,同时又忘记了密码?
/usr/local/mariadb/bin/mysqladmin -u有权限的用户名 -p密码 shutdown
/usr/local/mariadb/bin/mysqld_safe --skip-grant-tables &
mysql -A -e "update mysql.user set password=password('root') where user='root'";
mysql -A -e "flush privileges;"
/usr/local/mariadb/bin/mysqladmin shutdown
mkdir -p /var/run/mariadb; chown -R mysql:mysql /var/run/mariadb; /usr/local/mariadb/bin/mysqld_safe --datadir=/data/mariadb/data --pid-file=/var/run/mariadb/mariadb.pid > /dev/null 2>&1 &