To resolve the mentioned error in MariaDB, you need to reset the root password. Here are the steps:
Step 1: Stop the MariaDB service.
Depending on which system you use, execute one of the following commands:
- For Debian/Ubuntu: \`\`\` sudo service mysql stop \`\`\`
- For RHEL/CentOS: \`\`\` sudo systemctl stop mariadb \`\`\`
Step 2: Start MariaDB in Safe Mode. This command allows you to login without password:
```
sudo mysqld_safe —skip-grant-tables —skip-networking &
```
Step 3: Connect to the MariaDB server:
```
mysql -u root
```
Step 4: Reset password.
In the MariaDB shell, execute the following commands:
```
use mysql;
UPDATE user SET password=PASSWORD WHERE User=‘root’;
flush privileges;
exit;
```
Replace ‘new-password’ with your desired password.
Step 5: Restart MariaDB service.
- For Debian/Ubuntu: \`\`\` sudo service mysql restart \`\`\`
- For RHEL/CentOS: \`\`\` sudo systemctl start mariadb \`\`\`
Now you should be able to login to MariaDB with your new password.
If the above does not work, you may need to replace `password` column with `authentication_string`. It might vary depending on the version of your MariaDB/MySQL.
Always remember to replace ‘new-password’ with your actual new password in above commands.