impossible to set root user

So far I used xampp, but now I would like to use directly mariadb. I have a problem: how set root user, giving the necessary permissions. I guess that I have to modify the mysql database. But today this happened (with skip-tables-grant):

MariaDB [mysql]> SHOW GRANTS FOR 'root'@localhost; 
+-------------------------------------------------------------------------------------------------------------+
| Grants for root@localhost                                                                                   |
+-------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO `root`@`localhost` IDENTIFIED BY PASSWORD 'mypsw' |
+-------------------------------------------------------------------------------------------------------------+
1 row in set (0.001 sec)

MariaDB [mysql]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.001 sec)

MariaDB [mysql]> exit
Bye 

But despite it now root is still without permissions (after commenting skip-tables and restarting mariadb):

MariaDB [(none)]> use mysql
ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'mysql'

Where I was wrong?

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.