Scenario:
Today when was trying to take logical backup of MariaDB database by using below
Shell> mysqldump DatabaseName > DatabaseName.sql
got below error
error: Found option without preceding group in config file: /etc/my.cnf.d/server.cnf at line: 6
mysqldump: Got error: 1045: "Access denied for user 'username'@'localhost' (using password: NO)" when trying to connect
Solution:
Checked the server.cnf file but could not find anything missing. Found out that if you will use root with password that will work. Used the below statement and it worked.


