Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have MySQL 5.5 running on Ubuntu Server 12.10. When I run /etc/init.d/mysql restart, I get the following:

mysql start/running, process 2754

However, when I open /etc/mysql/my.cnf in Windows via a Samba share and save the file without any changes, I get the following when running the exact same command, /etc/init.d/mysql restart:

start: Job failed to start

What is causing the mysql from restarting? How can I make edits in windows without breaking my config file?

share|improve this question

It could it be Windows line endings vs Unix line endings?

share|improve this answer

You can make changes in Windows but you have to use other editor than Notepad. Try Notepad++, PsPad or similar software. Windows notepad always change line endings to Windows style and it causes problem.

share|improve this answer

You can use the dos2unix tool to convert the line endings to the unix format:

$ sudo apt-get install dos2unix
$ dos2unix /path/to/my.cnf

and see if this fixes the issue, now that its done.
Probably when you opened the file with notepad or some other editor, it asked you to convert the line endings to windows compatible and you selected yes.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.