I just installed MariaDB on a RHEL system and this is my first time using MariaDB. I can start/stop the service only using the following commands:
sudo systemctl start mariadb.service sudo systemctl enable mariadb.service sudo systemctl stop mariadb.service
Now, when I try to use the following:
I'm given the following error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Being a fresh install I would expect the password to be blank and I have uninstalled and reinstalled hoping that might resolve the issue but clearly it didn't.
I have read about using --skip-grant-tables to reset the password for root but I have been unable to start the service with this option in place given that I have to use systemctl. I'm not sure if perhaps I'm putting the option in the wrong location in the command, but I have tried a number of methods to no avail.
No other commands (from /etc/init.d) work at all to get this service running.
If anyone can assist in helping me get the --skip-grant-tables working or to figure out how to somehow reset the root password for mariadb, or somehow set up another user with all privileges, I would greatly appreciate it. Thanks.