Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: jeff on May 15, 2003, 07:45:35 AM

Title: mysql woes
Post by: jeff on May 15, 2003, 07:45:35 AM
Hi all,
I'm trying to set up an ibay w/php accessing the mysql db, and I'm not having any luck.
I log on via ssh (I'm remote) as root, and of course it won't let me run mysql as root. I figured I screwed up the password deal when I set this up a while ago, so I tried mysqld stop, conf-mysql-password, and I get an error saying it can't find the file or dir.

Can someone please point me in the right direction for troubleshooting?

Is there some trick to running mysql that I've missed? Or is it an SME issue?

Any help is greatly appreciated.

Jeff
Title: Re: mysql woes
Post by: JoeyP on May 15, 2003, 11:55:13 AM
How to change the MySQL root password in SME Server 5.1.2  by Dan Brown

How to change your MySQL password  by Thor Anthrax

at

http://www.e-smith.org/cgi-bin/contrib.cgi
Title: Re: mysql woes
Post by: guestHH on May 15, 2003, 06:44:47 PM
http://www.familybrown.org/howtos/mysql-password-howto.html
Title: Re: mysql woes
Post by: jeff on May 15, 2003, 07:21:41 PM
Thanks for the responses.  I've tried the Dan Brown site, and I get the following:
1- mysqld stop (ok)
2- conf-mysql-password
ERROR: Cannot create the output file //root/.my.cnf.19867: No such file or directory at /etc/e-smith/events/actions/conf-mysql-password line 40

The other site mentioned, "how to change your mysql password", is a dead link. I checked the root of the site, and I didn't see a howto.

Any other thoughts?

Jeff
Title: Re: mysql woes
Post by: jeff on May 15, 2003, 07:31:15 PM
I'm beginning to think the issue is that I'm trying to access mysql via SSH. Is this plausible?
Title: Re: mysql woes
Post by: guestHH on May 15, 2003, 07:37:04 PM
nope, try make a dummy .my.cnf and try again
Title: Re: mysql woes
Post by: Dan Brown on May 15, 2003, 07:46:25 PM
Does this directory exist on your server?

/etc/e-smith/templates/root/.my.cnf

If so, what files does it contain?

If not, what does 'rpm -q e-smith-mysql' return?

The fact that you're trying to access via SSH shouldn't affect anything.
Title: Re: mysql woes
Post by: jeff on May 15, 2003, 07:50:05 PM
yep, here's /etc/e-smith/templates/root/.my.cnf

" Press ? for keyboard shortcuts
" Sorted by name (.bak,~,.o,.h,.info,.swp,.obj at end of list)
"= /etc/e-smith/templates/root/.my.cnf/
../
50client
55password
template-begin
template-end
Title: Re: mysql woes
Post by: Dan Brown on May 15, 2003, 07:52:04 PM
OK, do you have /etc/openldap/ldap.pw on your system?  And what about a /root/.my.cnf file?
Title: Re: mysql woes -correction
Post by: jeff on May 15, 2003, 07:52:19 PM
missed the last line of .my.cnf

" Press ? for keyboard shortcuts
" Sorted by name (.bak,~,.o,.h,.info,.swp,.obj at end of list)
"= /etc/e-smith/templates/root/.my.cnf/
../
50client
55password
template-begin
template-end
.50client.swp
Title: Re: mysql woes
Post by: jeff on May 15, 2003, 07:56:10 PM
yes, I have /etc/openldap/ldap.pw

No, there is no /root/ dir .
When I  echo $HOME in /home, it seems to think there's a /root, but not (at least) when I'm logged in as root.

Should I make a /root dir and add .my.cnf, as RequestedDeletion suggested? And then reset the root pswd?
Title: Re: mysql woes
Post by: Dan Brown on May 15, 2003, 07:58:47 PM
You have no /root/ directory?  Yep, that could be a problem--a big problem, in fact.  echo $HOME doesn't say anything about what directories exist on your system; it just says that your home directory (as root) _should_ be /root/.

Yes, make a /root/ directory, but don't make a .my.cnf file there.  Just rerun the conf-mysql-password command, which will take care of that.
Title: Re: mysql woes
Post by: jeff on May 15, 2003, 08:04:12 PM
Yeah, I wondered why there was no root. I figured it was all part of the e-smith "customized package". ;-)

Thanks a million, it's working now!

Jeff
Title: Re: mysql woes
Post by: Charlie on May 15, 2003, 09:31:26 PM
jeff wrote:

> Should I make a /root dir and add .my.cnf, as RequestedDeletion
> suggested?

No, you should attempt to work out why /root disappeared.

Charlie
Title: Re: mysql woes
Post by: jeff on May 15, 2003, 09:53:32 PM
Root cause analysis! Amen!

And I really hope you have some useful suggestions and/or ideas regarding where to start finding the root cause!