phpMyAdmin and MySql mysqli_sql_exception error

Job ID: 37503532

Budget: ₹1,500 – ₹12,500 INR

I can only access phpMyadmin through WHM when I have the following in my /etc/my.cnf file - [mysqld] skip-grant-tables

But then I am not able to retrieve the data from mysql table in my webpages.

However when I remove skip-grant-tables from my.cnf, I an able to view the data in my webpages but phpMyAdmin stops working. I get the message - mysqli_sql_exception: Access denied for user 'root'@'localhost' (using password: YES)

I am using AlmaLinux 8
Related categories: PHP Linux SQL MySQL Database Administration