Koozali.org formerly Contribs.org

I’m an idiot! !!!!!!! Mysql password problems

cgetty

I’m an idiot! !!!!!!! Mysql password problems
« on: August 27, 2006, 03:59:36 AM »
Hi all

I’m running SME 7.0.  

I’m an idiot! !!!!!!!

I load up phpmyadmin. It was working fine. Then I came up with this grand idea to change the password for ‘root@localhost’. I was promptly locked out from access.

Then I said  “I’ll just reset the password for mysql and all will be fine. Well that diden’t  help that only broke Horde webmail.

Then I ran across the instructions to reset the password .
http://www.familybrown.org/howtos/mysql-password-howto.html

But its for sme server 5.2 & the instructions don’t work for SME 7.0.

Is there a way to reset the sme password or am I SOL?

Thanks
Clark

Offline mmccarn

  • *
  • 2,454
I’m an idiot! !!!!!!! Mysql password problems
« Reply #1 on: August 27, 2006, 06:51:18 AM »
[guess]
If you can still login to the console, you might try:
# signal-event post-upgrade
# signal-event reboot

If the default sql password is in one of the databases that might reset it enough for webmail & server-manager to work again...
[/guess]

cgetty

I’m an idiot! !!!!!!! Mysql password problems
« Reply #2 on: August 27, 2006, 07:16:33 AM »
Hi mmccarn

Was able to ssh in & run the command, but did not work.

But thanks very much for your reply :-D

Clark

Offline mmccarn

  • *
  • 2,454
I’m an idiot! !!!!!!! Mysql password problems
« Reply #3 on: August 27, 2006, 07:50:40 AM »
# config show horde

displays something called "DBPassword" - what if you change that entry to match your new password?

SME 6.0.1 seems to have a script in /etc/e-smith/events/actions called conf-horde-startup that looks like it resets lots of stuff and generates a new db password for horde - I can't figure out if there's a 7.0 counterpart...

Otherwise, all I can find are some posts that say "NEVER NEVER NEVE" change the root password...

Good luck, & keep us posted!

Offline pfloor

  • ****
  • 888
I’m an idiot! !!!!!!! Mysql password problems
« Reply #4 on: August 27, 2006, 10:44:15 AM »
Search is your friend...Really!

Here you go:

# cd /var/service/mysqld
# runsvctrl d .
# expand-template /root/.my.cnf
# expand-template /var/service/mysqld/set.password
# /usr/libexec/mysqld --bootstrap --user=mysql --skip-grant-tables \
    < ./set.password
# runsvctrl u .


Oh and by the way, NEVER EVER change the mysql root password  :-D
In life, you must either "Push, Pull or Get out of the way!"

cgetty

I’m an idiot! !!!!!!! Mysql password problems
« Reply #5 on: August 27, 2006, 04:51:56 PM »
Hey Paul

Everything worked up to this line

Quote
/usr/libexec/mysqld --bootstrap --user=mysql --skip-grant-tables \
< ./set.password


Tried different combinations, this is one string, no?

Thanks
Clark[/quote]

frond

I’m an idiot! !!!!!!! Mysql password problems
« Reply #6 on: August 27, 2006, 05:02:44 PM »
cgetty

> Tried different combinations, this is one string, no?

Post exactly what you typed, it's best to copy/paste from the Putty window so you don't misquote (if you are using that).

Offline pfloor

  • ****
  • 888
I’m an idiot! !!!!!!! Mysql password problems
« Reply #7 on: August 27, 2006, 07:11:23 PM »
Time for Linux basics 101...

Command line syntax can be input in more than one line using a backslash (\), this is done to avoid line wrapping problems/confusion that can occur with long commands.  Here is an example:

# ping 192.168.0.1 <enter>

can also be done with:

# ping \ <enter>
   192.1668.0.1 <enter>

So any line(s) with a "\" can be all input into 1 line if you remove the \.

/usr/libexec/mysqld --bootstrap --user=mysql --skip-grant-tables \ <enter>
< ./set.password <enter>

Can also be done as:

/usr/libexec/mysqld --bootstrap --user=mysql --skip-grant-tables < ./set.password <enter>

Quote from: "cgetty"
I’m an idiot! !!!!!!!

Sorry, I should have taken this into account when posting the answer.  I thought you were joking.
In life, you must either "Push, Pull or Get out of the way!"

Offline judgej

  • *
  • 375
I’m an idiot! !!!!!!! Mysql password problems
« Reply #8 on: August 28, 2006, 01:15:11 AM »
Quote from: "pfloor"
Oh and by the way, NEVER EVER change the mysql root password  :-D


Just to reiterate: NEVER, NEVER, EVER change the root mysql password on SME Server. Do not do it. Just don't. Ever. It has been said so many times...
-- Jason