Koozali.org: home of the SME Server

mysql woes

jeff

mysql woes
« 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

JoeyP

Re: mysql woes
« Reply #1 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

guestHH


jeff

Re: mysql woes
« Reply #3 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

jeff

Re: mysql woes
« Reply #4 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?

guestHH

Re: mysql woes
« Reply #5 on: May 15, 2003, 07:37:04 PM »
nope, try make a dummy .my.cnf and try again

Dan Brown

Re: mysql woes
« Reply #6 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.

jeff

Re: mysql woes
« Reply #7 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

Dan Brown

Re: mysql woes
« Reply #8 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?

jeff

Re: mysql woes -correction
« Reply #9 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

jeff

Re: mysql woes
« Reply #10 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?

Dan Brown

Re: mysql woes
« Reply #11 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.

jeff

Re: mysql woes
« Reply #12 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

Charlie

Re: mysql woes
« Reply #13 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

jeff

Re: mysql woes
« Reply #14 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!