1. 停止MariaDB service
#
systemctl stop mariadb.service
2.啟動safe mode
#
mysqld_safe --skip-grant-tables &
3.
access the MySQL console and connect to
the database:
#
mysql -u root
>use
mysql;
4.create
a new password for the root user, flush the new privileges, and exit
the MySQL console like this:
>
update user set password=PASSWORD("NEW_PASSWORD") where User='root';
>
flush privileges;
>
exit
沒有留言:
張貼留言