MySQL/MariaDB root user lost privileges

Solution Verified - Updated -


  • After allowing root to login from remote location, all privileges were lost
  • Below command was used:
    CREATE USER root@'%' IDENTIFIED BY 'password';
  • When connecting to MariaDB server over network, below error message was returned:

    MariaDB [(none)]> use mysql;
    ERROR 1044 (42000): Access denied for user 'root'@'%' to database 'mysql'
  • When showing grants, ALL privilege was lost:

    MariaDB [(none)]> show grants for root;
    | Grants for root@%                                                       |
    | GRANT USAGE ON *.* TO 'root'@'%' IDENTIFIED BY PASSWORD '*62AB24D83318' |
    1 row in set (0.00 sec)


  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • MariaDB
  • MySQL

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In