"unable to connect to mysql database in ubuntu" Code Answer


the error is very clearly explained in the warning message, it is ignoring your my.cnf.

warning: world-writable config file '/etc/mysql/my.cnf' is ignored

try executing the following, and then restarting the server

chown mysql:mysql /etc/mysql/my.cnf
chmod 600 /etc/mysql/my.cnf

this will set the owner of the file to mysql and the permissions 600 will give only the user mysql access to read and write to the file, it will disallow access to all other users.

By Rody Davis on March 31 2022

Answers related to “unable to connect to mysql database in ubuntu”

Only authorized users can answer the Search term. Please sign in first, or register a free account.