Phpmyadmin does not have root privileges

Hi, I accidentally revoked the PRIVILEGES from the root user, and now I can’t make any changes because I don’t have any rights anymore. Does anyone know how I can restore them? This command doesn’t work either.

MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' IDENTIFIED BY '1235464'
WITH GRANT OPTION;
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
MariaDB [(none)]>

thank you