Koozali.org: home of the SME Server

Big Mistake... MySQL .my.cnf

Silwenae

Big Mistake... MySQL .my.cnf
« on: October 30, 2001, 08:41:43 AM »
After reading how to get the MySQL password, I attempted to edit my .my.cnf file, and for some reason I didn't make a backup.  When I screw up, I screw up big.

Somehow, I edited the first 2 lines of the file.  Scrolling up to see what I did, I thought I put it back the way it was, but I didn't.

Now when I try to do:

mysql -u root mysql

I get:

error:  Found option without preceding group in config file: /root/.my.cnf at line: 2

(It was originally line one before I went and edited it again with what I thought was the first 2 lines.)

Anyone have any suggestions?  Re-installing isn't something I'm very keen on.

Thanks.

Silwenae
silwenae@silwenae.com

Rich Lafferty

Re: Big Mistake... MySQL .my.cnf
« Reply #1 on: October 30, 2001, 07:06:47 PM »
Regenerate the file from the template:

   /sbin/e-smith/expand-template /root/.my.cnf

Note that you shouldn't be editing that file in-place anyhow,
since it will be replaced whenever the template is expanded.
Instead, make a custom template. If you're not familiar with
the templating system, it's worth reading the white paper
on it, at

  http://www.e-smith.org/docs/papers/templates.html

Hope this helps,

  -Rich