Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

I have written a line in nano /etc/my.cnf file and how I'm not able to remove it

I have added secure-file-priv = "" to my nano /etc/my.cnf file for mysql and now I’m not able to remove it.When I remove that line and try to save it, it’s asking me to write to a file and the changes are not saved

I tried to uninstall and install mySQL but due to this the server is not able to start.

Error Messages:
my_print_defaults: [ERROR] Found option without preceding group in config file /etc/my.cnf at line 1.
my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted!
Starting MySQL
.my_print_defaults: [ERROR] Found option without preceding group in config file /etc/my.cnf at line 1.
my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted!
my_print_defaults: [ERROR] Found option without preceding group in config file /etc/my.cnf at line 1.
my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted!

Is there any way I can fix this error, I tried a lot but couldn’t find any solution

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

"errors when saving" are often linked to access rights issues.

  • run ls -l /etc/my.cnf to confirm that this file is owned by root.

  • in the vast majority of cases, system wide configuration files are owned by root. To edit a root file, you should do it with root privileges, e.g :

sudo nano /etc/my.cnf

(that’s probably how you were able to add the config parameter in the first place)

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading